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.
This commit is contained in:
Yan 2008-01-22 11:34:13 -05:00 committed by David Woodhouse
parent d751af515b
commit 6f30791b51
1 changed files with 5 additions and 0 deletions

View File

@ -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;
}