diff options
author | Josef Bacik <josef@toxicpanda.com> | 2021-11-05 16:45:49 -0400 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2022-01-03 15:09:49 +0100 |
commit | 7939dd9f35f6f76f5ee199851bcb4d89cd7be061 (patch) | |
tree | b0a801826cea941124130edebcbfa3834c93c2a0 /fs/btrfs/disk-io.c | |
parent | fc28b25e1f428651133326300d9572b42aae6d8f (diff) | |
download | linux-7939dd9f35f6f76f5ee199851bcb4d89cd7be061.tar.bz2 |
btrfs: stop accessing ->free_space_root directly
We're going to have multiple free space roots in the future, so adjust
all the users of the free space root to use a helper to access the root.
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.c')
-rw-r--r-- | fs/btrfs/disk-io.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/fs/btrfs/disk-io.c b/fs/btrfs/disk-io.c index 4b4a8dae0b1c..066df9869bb1 100644 --- a/fs/btrfs/disk-io.c +++ b/fs/btrfs/disk-io.c @@ -1571,8 +1571,8 @@ static struct btrfs_root *btrfs_get_global_root(struct btrfs_fs_info *fs_info, return btrfs_grab_root(fs_info->uuid_root) ? fs_info->uuid_root : ERR_PTR(-ENOENT); if (objectid == BTRFS_FREE_SPACE_TREE_OBJECTID) - return btrfs_grab_root(fs_info->free_space_root) ? - fs_info->free_space_root : ERR_PTR(-ENOENT); + return btrfs_grab_root(fs_info->_free_space_root) ? + fs_info->_free_space_root : ERR_PTR(-ENOENT); return NULL; } @@ -1637,7 +1637,7 @@ void btrfs_free_fs_info(struct btrfs_fs_info *fs_info) btrfs_put_root(fs_info->_csum_root); btrfs_put_root(fs_info->quota_root); btrfs_put_root(fs_info->uuid_root); - btrfs_put_root(fs_info->free_space_root); + btrfs_put_root(fs_info->_free_space_root); btrfs_put_root(fs_info->fs_root); btrfs_put_root(fs_info->data_reloc_root); btrfs_check_leaked_roots(fs_info); @@ -2176,7 +2176,7 @@ static void free_root_pointers(struct btrfs_fs_info *info, bool free_chunk_root) free_root_extent_buffers(info->data_reloc_root); if (free_chunk_root) free_root_extent_buffers(info->chunk_root); - free_root_extent_buffers(info->free_space_root); + free_root_extent_buffers(info->_free_space_root); } void btrfs_put_root(struct btrfs_root *root) @@ -2542,7 +2542,7 @@ static int btrfs_read_roots(struct btrfs_fs_info *fs_info) } } else { set_bit(BTRFS_ROOT_TRACK_DIRTY, &root->state); - fs_info->free_space_root = root; + fs_info->_free_space_root = root; } } |