Skip to content

Commit

Permalink
Btrfs: Fix for test_range_bit
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
ukernel authored and chrismason-xx committed Sep 25, 2008
1 parent b178542 commit f0c5da1
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions fs/btrfs/extent_map.c
Original file line number Diff line number Diff line change
Expand Up @@ -1336,6 +1336,11 @@ int test_range_bit(struct extent_map_tree *tree, u64 start, u64 end,
if (start > end)
break;
node = rb_next(node);
if (!node) {
if (filled)
bitset = 0;
break;
}
}
read_unlock_irq(&tree->lock);
return bitset;
Expand Down

0 comments on commit f0c5da1

Please sign in to comment.