提交 e4e0711c 编写于 作者: N Nikolay Borisov 提交者: David Sterba

btrfs: Remove fs_info argument from add_block_group_free_space

We also pass in a transaction handle which has a reference to the
fs_info. Just remove the extraneous argument.
Signed-off-by: NNikolay Borisov <nborisov@suse.com>
Reviewed-by: NDavid Sterba <dsterba@suse.com>
Signed-off-by: NDavid Sterba <dsterba@suse.com>
上级 483bce06
...@@ -10259,7 +10259,7 @@ void btrfs_create_pending_block_groups(struct btrfs_trans_handle *trans) ...@@ -10259,7 +10259,7 @@ void btrfs_create_pending_block_groups(struct btrfs_trans_handle *trans)
key.offset); key.offset);
if (ret) if (ret)
btrfs_abort_transaction(trans, ret); btrfs_abort_transaction(trans, ret);
add_block_group_free_space(trans, fs_info, block_group); add_block_group_free_space(trans, block_group);
/* already aborted the transaction if it failed. */ /* already aborted the transaction if it failed. */
next: next:
list_del_init(&block_group->bg_list); list_del_init(&block_group->bg_list);
......
...@@ -1292,9 +1292,9 @@ static int __add_block_group_free_space(struct btrfs_trans_handle *trans, ...@@ -1292,9 +1292,9 @@ static int __add_block_group_free_space(struct btrfs_trans_handle *trans,
} }
int add_block_group_free_space(struct btrfs_trans_handle *trans, int add_block_group_free_space(struct btrfs_trans_handle *trans,
struct btrfs_fs_info *fs_info,
struct btrfs_block_group_cache *block_group) struct btrfs_block_group_cache *block_group)
{ {
struct btrfs_fs_info *fs_info = trans->fs_info;
struct btrfs_path *path = NULL; struct btrfs_path *path = NULL;
int ret = 0; int ret = 0;
......
...@@ -19,7 +19,6 @@ int btrfs_create_free_space_tree(struct btrfs_fs_info *fs_info); ...@@ -19,7 +19,6 @@ int btrfs_create_free_space_tree(struct btrfs_fs_info *fs_info);
int btrfs_clear_free_space_tree(struct btrfs_fs_info *fs_info); int btrfs_clear_free_space_tree(struct btrfs_fs_info *fs_info);
int load_free_space_tree(struct btrfs_caching_control *caching_ctl); int load_free_space_tree(struct btrfs_caching_control *caching_ctl);
int add_block_group_free_space(struct btrfs_trans_handle *trans, int add_block_group_free_space(struct btrfs_trans_handle *trans,
struct btrfs_fs_info *fs_info,
struct btrfs_block_group_cache *block_group); struct btrfs_block_group_cache *block_group);
int remove_block_group_free_space(struct btrfs_trans_handle *trans, int remove_block_group_free_space(struct btrfs_trans_handle *trans,
struct btrfs_fs_info *fs_info, struct btrfs_fs_info *fs_info,
......
...@@ -491,7 +491,7 @@ static int run_test(test_func_t test_func, int bitmaps, u32 sectorsize, ...@@ -491,7 +491,7 @@ static int run_test(test_func_t test_func, int bitmaps, u32 sectorsize,
goto out; goto out;
} }
ret = add_block_group_free_space(&trans, root->fs_info, cache); ret = add_block_group_free_space(&trans, cache);
if (ret) { if (ret) {
test_msg("Could not add block group free space\n"); test_msg("Could not add block group free space\n");
goto out; goto out;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册