Skip to content

Commit 5fc86db

Browse files
committed
btrfs: use btrfs_root_id() where not done yet
A few more remaining cases where we can use the helper. Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com> Signed-off-by: David Sterba <dsterba@suse.com>
1 parent 2282d4f commit 5fc86db

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

fs/btrfs/extent-tree.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5554,7 +5554,7 @@ static int check_ref_exists(struct btrfs_trans_handle *trans,
55545554
goto again;
55555555
}
55565556

5557-
exists = btrfs_find_delayed_tree_ref(head, root->root_key.objectid, parent);
5557+
exists = btrfs_find_delayed_tree_ref(head, btrfs_root_id(root), parent);
55585558
mutex_unlock(&head->mutex);
55595559
out:
55605560
spin_unlock(&delayed_refs->lock);

fs/btrfs/extent_io.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1704,7 +1704,7 @@ static int extent_writepage(struct folio *folio, struct btrfs_bio_ctrl *bio_ctrl
17041704
WARN_ON(IS_ENABLED(CONFIG_BTRFS_DEBUG));
17051705
btrfs_err_rl(fs_info,
17061706
"root %lld ino %llu folio %llu is marked dirty without notifying the fs",
1707-
inode->root->root_key.objectid,
1707+
btrfs_root_id(inode->root),
17081708
btrfs_ino(inode), folio_pos(folio));
17091709
ret = -EUCLEAN;
17101710
goto done;

fs/btrfs/inode.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2881,7 +2881,7 @@ int btrfs_writepage_cow_fixup(struct folio *folio)
28812881
DEBUG_WARN();
28822882
btrfs_err_rl(fs_info,
28832883
"root %lld ino %llu folio %llu is marked dirty without notifying the fs",
2884-
BTRFS_I(inode)->root->root_key.objectid,
2884+
btrfs_root_id(BTRFS_I(inode)->root),
28852885
btrfs_ino(BTRFS_I(inode)),
28862886
folio_pos(folio));
28872887
return -EUCLEAN;
@@ -8023,7 +8023,7 @@ static int btrfs_getattr(struct mnt_idmap *idmap,
80238023
generic_fillattr(idmap, request_mask, inode, stat);
80248024
stat->dev = BTRFS_I(inode)->root->anon_dev;
80258025

8026-
stat->subvol = BTRFS_I(inode)->root->root_key.objectid;
8026+
stat->subvol = btrfs_root_id(BTRFS_I(inode)->root);
80278027
stat->result_mask |= STATX_SUBVOL;
80288028

80298029
spin_lock(&BTRFS_I(inode)->lock);

0 commit comments

Comments
 (0)