summaryrefslogtreecommitdiffstats
path: root/fs/btrfs/free-space-tree.c
diff options
context:
space:
mode:
authorNikolay Borisov <nborisov@suse.com>2018-05-10 14:44:44 +0200
committerDavid Sterba <dsterba@suse.com>2018-05-28 18:07:33 +0200
commit66afee18485932ab1f6000eb37c8605175b5339e (patch)
tree85fda5e399c714d46a6427ba6d3bf2c9540f75dd /fs/btrfs/free-space-tree.c
parentbtrfs: Remove fs_info argument from __add_to_free_space_tree (diff)
downloadlinux-66afee18485932ab1f6000eb37c8605175b5339e.tar.xz
linux-66afee18485932ab1f6000eb37c8605175b5339e.zip
btrfs: Remove fs_info parameter from add_new_free_space_info
This function already takes trans handle from where fs_info can be referenced. Remove the redundant parameter. Signed-off-by: Nikolay Borisov <nborisov@suse.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.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/fs/btrfs/free-space-tree.c b/fs/btrfs/free-space-tree.c
index 501769b941a8..4b687e2f97aa 100644
--- a/fs/btrfs/free-space-tree.c
+++ b/fs/btrfs/free-space-tree.c
@@ -44,11 +44,10 @@ void set_free_space_tree_thresholds(struct btrfs_block_group_cache *cache)
}
static int add_new_free_space_info(struct btrfs_trans_handle *trans,
- struct btrfs_fs_info *fs_info,
struct btrfs_block_group_cache *block_group,
struct btrfs_path *path)
{
- struct btrfs_root *root = fs_info->free_space_root;
+ struct btrfs_root *root = trans->fs_info->free_space_root;
struct btrfs_free_space_info *info;
struct btrfs_key key;
struct extent_buffer *leaf;
@@ -1067,7 +1066,7 @@ static int populate_free_space_tree(struct btrfs_trans_handle *trans,
return -ENOMEM;
}
- ret = add_new_free_space_info(trans, fs_info, block_group, path2);
+ ret = add_new_free_space_info(trans, block_group, path2);
if (ret)
goto out;
@@ -1277,7 +1276,7 @@ static int __add_block_group_free_space(struct btrfs_trans_handle *trans,
block_group->needs_free_space = 0;
- ret = add_new_free_space_info(trans, trans->fs_info, block_group, path);
+ ret = add_new_free_space_info(trans, block_group, path);
if (ret)
return ret;