diff options
author | Josef Bacik <josef@toxicpanda.com> | 2024-04-15 23:16:23 +0300 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2024-05-07 22:31:06 +0300 |
commit | e094f48040cda67622060857ad43dad9e418fbd7 (patch) | |
tree | 3ec00cdc01ff8d9ab4fb8edf2a62bab09245f3b7 /fs/btrfs/reflink.c | |
parent | 53e24158684b527d013b5b2204ccb34d1f94c248 (diff) | |
download | linux-e094f48040cda67622060857ad43dad9e418fbd7.tar.xz |
btrfs: change root->root_key.objectid to btrfs_root_id()
A comment from Filipe on one of my previous cleanups brought my
attention to a new helper we have for getting the root id of a root,
which makes it easier to read in the code.
The changes where made with the following Coccinelle semantic patch:
// <smpl>
@@
expression E,E1;
@@
(
E->root_key.objectid = E1
|
- E->root_key.objectid
+ btrfs_root_id(E)
)
// </smpl>
Reviewed-by: Filipe Manana <fdmanana@suse.com>
Signed-off-by: Josef Bacik <josef@toxicpanda.com>
Reviewed-by: David Sterba <dsterba@suse.com>
[ minor style fixups ]
Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'fs/btrfs/reflink.c')
-rw-r--r-- | fs/btrfs/reflink.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/btrfs/reflink.c b/fs/btrfs/reflink.c index f12ba2b75141..d0a3fcecc46a 100644 --- a/fs/btrfs/reflink.c +++ b/fs/btrfs/reflink.c @@ -665,7 +665,7 @@ static int btrfs_extent_same(struct inode *src, u64 loff, u64 olen, if (root_dst->send_in_progress) { btrfs_warn_rl(root_dst->fs_info, "cannot deduplicate to root %llu while send operations are using it (%d in progress)", - root_dst->root_key.objectid, + btrfs_root_id(root_dst), root_dst->send_in_progress); spin_unlock(&root_dst->root_item_lock); return -EAGAIN; |