mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2025-01-11 15:40:50 +00:00
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: Chris Mason <chris.mason@oracle.com>
This commit is contained in:
parent
dcfec0dcb1
commit
a273208edd
@ -475,8 +475,7 @@ next_slot:
|
|||||||
search_start = (extent_end + mask) & ~mask;
|
search_start = (extent_end + mask) & ~mask;
|
||||||
} else
|
} else
|
||||||
search_start = extent_end;
|
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;
|
*hint_byte = EXTENT_MAP_INLINE;
|
||||||
}
|
}
|
||||||
if (end < extent_end && end >= key.offset) {
|
if (end < extent_end && end >= key.offset) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user