aboutsummaryrefslogtreecommitdiffstats
path: root/fs/btrfs/extent_map.c
diff options
context:
space:
mode:
authorYan <yanzheng@21cn.com>2008-01-22 12:46:56 -0500
committerChris Mason <chris.mason@oracle.com>2008-09-25 11:03:59 -0400
commitf0c5da1446cc500856a5e31c9a0e2a7bdd30e663 (patch)
treec780414d086f5aa91c65e1471dbeb575d2d08447 /fs/btrfs/extent_map.c
parentb17854275cd297d40c6c5562fa44a472314c6c7f (diff)
Btrfs: Fix for test_range_bit
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. Signed-off-by: Chris Mason <chris.mason@oracle.com>
Diffstat (limited to 'fs/btrfs/extent_map.c')
-rw-r--r--fs/btrfs/extent_map.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/fs/btrfs/extent_map.c b/fs/btrfs/extent_map.c
index d71aed341abd..485cf0719b3c 100644
--- a/fs/btrfs/extent_map.c
+++ b/fs/btrfs/extent_map.c
@@ -1336,6 +1336,11 @@ int test_range_bit(struct extent_map_tree *tree, u64 start, u64 end,
1336 if (start > end) 1336 if (start > end)
1337 break; 1337 break;
1338 node = rb_next(node); 1338 node = rb_next(node);
1339 if (!node) {
1340 if (filled)
1341 bitset = 0;
1342 break;
1343 }
1339 } 1344 }
1340 read_unlock_irq(&tree->lock); 1345 read_unlock_irq(&tree->lock);
1341 return bitset; 1346 return bitset;