[Btrfs-devel][PATCH]small fix for find_lock_delalloc_range.
Yan Zheng
yanzheng at 21cn.com
Wed Oct 31 07:20:08 PDT 2007
Hello,
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.
Regards
YZ
---
diff -r bc6bfcf7a158 extent_map.c
--- a/extent_map.c Tue Oct 30 16:56:53 2007 -0400
+++ b/extent_map.c Wed Oct 31 21:58:21 2007 +0800
@@ -1039,6 +1039,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);
@@ -1054,7 +1056,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;
}
More information about the Btrfs-devel
mailing list