aboutsummaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorYan <yanzheng@21cn.com>2007-11-01 11:28:42 -0400
committerChris Mason <chris.mason@oracle.com>2008-09-25 11:03:57 -0400
commit944746ec7575258475958d858cdf3a0e4c8f7b9e (patch)
tree34364b6db250533e0170ea35e1cdd91fc549e884 /fs
parentBtrfs: Fix typo and memory leak in extent-tree.c (diff)
downloadlinux-dev-944746ec7575258475958d858cdf3a0e4c8f7b9e.tar.xz
linux-dev-944746ec7575258475958d858cdf3a0e4c8f7b9e.zip
Btrfs: small fixes for find_lock_delalloc_range.
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>
Diffstat (limited to 'fs')
-rw-r--r--fs/btrfs/extent_map.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/fs/btrfs/extent_map.c b/fs/btrfs/extent_map.c
index 44be9cfd30ee..ff8881fb56d6 100644
--- a/fs/btrfs/extent_map.c
+++ b/fs/btrfs/extent_map.c
@@ -1044,6 +1044,8 @@ search_again:
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);
@@ -1059,7 +1061,7 @@ search_again:
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;
}