diff options
author | Josef Bacik <josef@toxicpanda.com> | 2021-11-05 16:45:45 -0400 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2022-01-03 15:09:49 +0100 |
commit | 29cbcf401793f4e2c871c846edc2191731df2c41 (patch) | |
tree | 7209de0f3bb79a2516def19bbef0934c85753d63 /fs/btrfs/disk-io.h | |
parent | 2e608bd1dd51ee962bded788caee4aa812729e87 (diff) |
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/disk-io.h')
-rw-r--r-- | fs/btrfs/disk-io.h | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/fs/btrfs/disk-io.h b/fs/btrfs/disk-io.h index baca29523d35..e2824c6ada72 100644 --- a/fs/btrfs/disk-io.h +++ b/fs/btrfs/disk-io.h @@ -103,9 +103,15 @@ static inline struct btrfs_root *btrfs_grab_root(struct btrfs_root *root) return NULL; } +static inline struct btrfs_root *btrfs_extent_root(struct btrfs_fs_info *fs_info, + u64 bytenr) +{ + return fs_info->_extent_root; +} + static inline struct btrfs_root *btrfs_block_group_root(struct btrfs_fs_info *fs_info) { - return fs_info->extent_root; + return btrfs_extent_root(fs_info, 0); } void btrfs_put_root(struct btrfs_root *root); |