Skip to content

Commit

Permalink
Btrfs: small fixes for find_lock_delalloc_range.
Browse files Browse the repository at this point in the history
There is a 'finish_wait', but no 'prepare_to_wait' . So I think that
the 'prepare_to_wait' is missing. The second change is  according to
the name of variable.

Signed-off-by: Chris Mason <chris.mason@oracle.com>
  • Loading branch information
ukernel authored and chrismason-xx committed Sep 25, 2008
1 parent b97f920 commit 944746e
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion fs/btrfs/extent_map.c
Original file line number Diff line number Diff line change
Expand Up @@ -1044,6 +1044,8 @@ u64 find_lock_delalloc_range(struct extent_map_tree *tree,
if (state->state & EXTENT_LOCKED) {
DEFINE_WAIT(wait);
atomic_inc(&state->refs);
prepare_to_wait(&state->wq, &wait,
TASK_UNINTERRUPTIBLE);
write_unlock_irq(&tree->lock);
schedule();
write_lock_irq(&tree->lock);
Expand All @@ -1059,7 +1061,7 @@ u64 find_lock_delalloc_range(struct extent_map_tree *tree,
node = rb_next(node);
if (!node)
break;
total_bytes = state->end - state->start + 1;
total_bytes += state->end - state->start + 1;
if (total_bytes >= max_bytes)
break;
}
Expand Down

0 comments on commit 944746e

Please sign in to comment.