From: Yan Date: Tue, 22 Jan 2008 16:34:13 +0000 (-0500) Subject: Fix for test_range_bit X-Git-Tag: upstream/0.20.rc1~327 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=6f30791b5120b3a4c83ff4a9b451c1647240c480;p=platform%2Fupstream%2Fbtrfs-progs.git 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. --- diff --git a/extent_map.c b/extent_map.c index c797926..bc67c0e 100644 --- a/extent_map.c +++ b/extent_map.c @@ -473,6 +473,11 @@ int test_range_bit(struct extent_map_tree *tree, u64 start, u64 end, if (start > end) break; node = next_cache_extent(node); + if (!node) { + if (filled) + bitset = 0; + break; + } } return bitset; }