diff options
author | Filipe Manana <fdmanana@suse.com> | 2020-09-08 12:27:21 +0200 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2020-10-07 12:13:16 +0200 |
commit | fb870f6cdd72a1f143d9d25ab864e474fed65616 (patch) | |
tree | e2a6b3f15909474609b0feeb6b4ef5e5eb8fc7b6 /fs/btrfs/reflink.c | |
parent | btrfs: fix metadata reservation for fallocate that leads to transaction aborts (diff) | |
download | linux-fb870f6cdd72a1f143d9d25ab864e474fed65616.tar.xz linux-fb870f6cdd72a1f143d9d25ab864e474fed65616.zip |
btrfs: remove item_size member of struct btrfs_clone_extent_info
The value of item_size of struct btrfs_clone_extent_info is always set to
the size of a non-inline file extent item, and in fact the infrastructure
that uses this structure (btrfs_punch_hole_range()) does not work with
inline file extents at all (and it is not supposed to).
So just remove that field from the structure and use directly
sizeof(struct btrfs_file_extent_item) instead. Also assert that the
file extent type is not inline at btrfs_insert_clone_extent().
Reviewed-by: Josef Bacik <josef@toxicpanda.com>
Signed-off-by: Filipe Manana <fdmanana@suse.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'fs/btrfs/reflink.c')
-rw-r--r-- | fs/btrfs/reflink.c | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/fs/btrfs/reflink.c b/fs/btrfs/reflink.c index 3c03126b52b1..020da4d65b64 100644 --- a/fs/btrfs/reflink.c +++ b/fs/btrfs/reflink.c @@ -462,7 +462,6 @@ process_slot: clone_info.data_len = datal; clone_info.file_offset = new_key.offset; clone_info.extent_buf = buf; - clone_info.item_size = size; clone_info.is_new_extent = false; ret = btrfs_punch_hole_range(inode, path, drop_start, new_key.offset + datal - 1, &clone_info, |