aboutsummaryrefslogtreecommitdiffstats
path: root/fs/btrfs/tree-mod-log.c
diff options
context:
space:
mode:
authorJosef Bacik <[email protected]>2024-04-15 20:16:23 +0000
committerDavid Sterba <[email protected]>2024-05-07 19:31:06 +0000
commite094f48040cda67622060857ad43dad9e418fbd7 (patch)
tree3ec00cdc01ff8d9ab4fb8edf2a62bab09245f3b7 /fs/btrfs/tree-mod-log.c
parentbtrfs: set start on clone before calling copy_extent_buffer_full (diff)
downloadkernel-e094f48040cda67622060857ad43dad9e418fbd7.tar.gz
kernel-e094f48040cda67622060857ad43dad9e418fbd7.zip
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 <[email protected]> Signed-off-by: Josef Bacik <[email protected]> Reviewed-by: David Sterba <[email protected]> [ minor style fixups ] Signed-off-by: David Sterba <[email protected]>
Diffstat (limited to 'fs/btrfs/tree-mod-log.c')
-rw-r--r--fs/btrfs/tree-mod-log.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/btrfs/tree-mod-log.c b/fs/btrfs/tree-mod-log.c
index 43b3accbed7a..fa45b5fb9683 100644
--- a/fs/btrfs/tree-mod-log.c
+++ b/fs/btrfs/tree-mod-log.c
@@ -1004,7 +1004,7 @@ struct extent_buffer *btrfs_get_old_root(struct btrfs_root *root, u64 time_seq)
free_extent_buffer(eb_root);
check.level = level;
- check.owner_root = root->root_key.objectid;
+ check.owner_root = btrfs_root_id(root);
old = read_tree_block(fs_info, logical, &check);
if (WARN_ON(IS_ERR(old) || !extent_buffer_uptodate(old))) {