提交 f0c5da14 编写于 作者: Y Yan 提交者: Chris Mason

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: NChris Mason <chris.mason@oracle.com>
上级 b1785427
......@@ -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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册