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:
parent
d751af515b
commit
6f30791b51
|
@ -473,6 +473,11 @@ int test_range_bit(struct extent_map_tree *tree, u64 start, u64 end,
|
||||||
if (start > end)
|
if (start > end)
|
||||||
break;
|
break;
|
||||||
node = next_cache_extent(node);
|
node = next_cache_extent(node);
|
||||||
|
if (!node) {
|
||||||
|
if (filled)
|
||||||
|
bitset = 0;
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return bitset;
|
return bitset;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue