[Btrfs-devel][PATCH]Fix for test_range_bit
Yan Zheng
yanzheng at 21cn.com
Mon Jan 21 00:42:33 PST 2008
Hello,
test_range_bit doesn't properly handle the case: there's a hole at the
end of the range and there's no other extent_state after the range.
Regards
YZ
---
diff -r ac53d7df4c11 extent_map.c
--- a/extent_map.c Thu Jan 17 12:58:00 2008 -0500
+++ b/extent_map.c Mon Jan 21 16:42:04 2008 +0800
@@ -1336,6 +1336,11 @@ int test_range_bit(struct extent_map_tre
if (start > end)
break;
node = rb_next(node);
+ if (!node) {
+ if (filled)
+ bitset = 0;
+ break;
+ }
}
read_unlock_irq(&tree->lock);
return bitset;
More information about the Btrfs-devel
mailing list