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

Fix EXTENT_MAP_INLINE off by one in btrfs_drop_extents

Don't set hint_byte to EXTENT_MAP_INLINE when 'end == extent_end' or
'start == key.offset' . The inline extent will be truncated in these
cases.
Signed-off-by: NChris Mason <chris.mason@oracle.com>
上级 dcfec0dc
......@@ -475,8 +475,7 @@ int btrfs_drop_extents(struct btrfs_trans_handle *trans,
search_start = (extent_end + mask) & ~mask;
} else
search_start = extent_end;
if (end <= extent_end && start >= key.offset && found_inline) {
if (end < extent_end && start > key.offset && found_inline) {
*hint_byte = EXTENT_MAP_INLINE;
}
if (end < extent_end && end >= key.offset) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册