diff options
author | Josef Bacik <josef@toxicpanda.com> | 2021-11-05 21:45:45 +0100 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2022-01-03 15:09:49 +0100 |
commit | 29cbcf401793f4e2c871c846edc2191731df2c41 (patch) | |
tree | 7209de0f3bb79a2516def19bbef0934c85753d63 /fs/btrfs/free-space-tree.c | |
parent | btrfs: init root block_rsv at init root time (diff) | |
download | linux-29cbcf401793f4e2c871c846edc2191731df2c41.tar.xz linux-29cbcf401793f4e2c871c846edc2191731df2c41.zip |
btrfs: stop accessing ->extent_root directly
When we start having multiple extent roots we'll need to use a helper to
get to the correct extent_root. Rename fs_info->extent_root to
_extent_root and convert all of the users of the extent root to using
the btrfs_extent_root() helper. This will allow us to easily clean up
the remaining direct accesses in the future.
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/free-space-tree.c')
-rw-r--r-- | fs/btrfs/free-space-tree.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/btrfs/free-space-tree.c b/fs/btrfs/free-space-tree.c index 3abec44c6255..4e9bf940a566 100644 --- a/fs/btrfs/free-space-tree.c +++ b/fs/btrfs/free-space-tree.c @@ -1046,7 +1046,7 @@ out: static int populate_free_space_tree(struct btrfs_trans_handle *trans, struct btrfs_block_group *block_group) { - struct btrfs_root *extent_root = trans->fs_info->extent_root; + struct btrfs_root *extent_root; struct btrfs_path *path, *path2; struct btrfs_key key; u64 start, end; @@ -1080,6 +1080,7 @@ static int populate_free_space_tree(struct btrfs_trans_handle *trans, key.type = BTRFS_EXTENT_ITEM_KEY; key.offset = 0; + extent_root = btrfs_extent_root(trans->fs_info, key.objectid); ret = btrfs_search_slot_for_read(extent_root, &key, path, 1, 0); if (ret < 0) goto out_locked; |