summaryrefslogtreecommitdiff
path: root/fs/btrfs/inode-item.c
diff options
context:
space:
mode:
authorJosef Bacik <josef@toxicpanda.com>2024-04-13 02:37:53 +0300
committerDavid Sterba <dsterba@suse.com>2024-05-07 22:31:04 +0300
commitf2e69a77aa5150d8a8ea13e45aad6dc42e581591 (patch)
tree390183cf4617a22e4807ac9b1ffb692295f92093 /fs/btrfs/inode-item.c
parent4d09b4e942bce27c6fa66f3582dc639417107e2d (diff)
downloadlinux-f2e69a77aa5150d8a8ea13e45aad6dc42e581591.tar.xz
btrfs: move ref_root into btrfs_ref
We have this in both btrfs_tree_ref and btrfs_data_ref, which is just wasting space and making the code more complicated. Move this into btrfs_ref proper and update all the call sites to do the assignment in btrfs_ref. Reviewed-by: Filipe Manana <fdmanana@suse.com> Signed-off-by: Josef Bacik <josef@toxicpanda.com> Reviewed-by: David Sterba <dsterba@suse.com> Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'fs/btrfs/inode-item.c')
-rw-r--r--fs/btrfs/inode-item.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/fs/btrfs/inode-item.c b/fs/btrfs/inode-item.c
index d61bb65859a5..e24605df35bb 100644
--- a/fs/btrfs/inode-item.c
+++ b/fs/btrfs/inode-item.c
@@ -675,13 +675,13 @@ delete:
.bytenr = extent_start,
.len = extent_num_bytes,
.owning_root = root->root_key.objectid,
+ .ref_root = btrfs_header_owner(leaf),
};
bytes_deleted += extent_num_bytes;
- btrfs_init_data_ref(&ref, btrfs_header_owner(leaf),
- control->ino, extent_offset,
- root->root_key.objectid, false);
+ btrfs_init_data_ref(&ref, control->ino, extent_offset,
+ root->root_key.objectid, false);
ret = btrfs_free_extent(trans, &ref);
if (ret) {
btrfs_abort_transaction(trans, ret);