btrfs-progs: remove fs_info parameter from btrfs_create_tree()

The @fs_info parameter can be easily extracted from @trans, and kernel
has already remove the parameter.

Signed-off-by: Qu Wenruo <wqu@suse.com>
This commit is contained in:
Qu Wenruo 2024-07-02 16:57:21 +09:30 committed by David Sterba
parent 64e272e74f
commit 9b74d80919
4 changed files with 7 additions and 8 deletions

View File

@ -2369,12 +2369,12 @@ int btrfs_delete_and_free_root(struct btrfs_trans_handle *trans,
}
struct btrfs_root *btrfs_create_tree(struct btrfs_trans_handle *trans,
struct btrfs_fs_info *fs_info,
struct btrfs_key *key)
{
struct extent_buffer *leaf;
struct btrfs_fs_info *fs_info = trans->fs_info;
struct btrfs_root *tree_root = fs_info->tree_root;
struct btrfs_root *root;
struct extent_buffer *leaf;
int ret = 0;
root = kzalloc(sizeof(*root), GFP_KERNEL);

View File

@ -239,7 +239,6 @@ int write_tree_block(struct btrfs_trans_handle *trans,
struct extent_buffer *eb);
int btrfs_fs_roots_compare_roots(const struct rb_node *node1, const struct rb_node *node2);
struct btrfs_root *btrfs_create_tree(struct btrfs_trans_handle *trans,
struct btrfs_fs_info *fs_info,
struct btrfs_key *key);
int btrfs_delete_and_free_root(struct btrfs_trans_handle *trans,
struct btrfs_root *root);

View File

@ -1516,7 +1516,7 @@ int btrfs_create_free_space_tree(struct btrfs_fs_info *fs_info)
if (IS_ERR(trans))
return PTR_ERR(trans);
free_space_root = btrfs_create_tree(trans, fs_info, &root_key);
free_space_root = btrfs_create_tree(trans, &root_key);
if (IS_ERR(free_space_root)) {
ret = PTR_ERR(free_space_root);
goto abort;

View File

@ -748,7 +748,7 @@ static int create_data_reloc_tree(struct btrfs_trans_handle *trans)
char *name = "..";
int ret;
root = btrfs_create_tree(trans, fs_info, &key);
root = btrfs_create_tree(trans, &key);
if (IS_ERR(root)) {
ret = PTR_ERR(root);
goto out;
@ -870,7 +870,7 @@ static int create_uuid_tree(struct btrfs_trans_handle *trans)
int ret = 0;
UASSERT(fs_info->uuid_root == NULL);
root = btrfs_create_tree(trans, fs_info, &key);
root = btrfs_create_tree(trans, &key);
if (IS_ERR(root)) {
ret = PTR_ERR(root);
goto out;
@ -900,7 +900,7 @@ static int create_global_root(struct btrfs_trans_handle *trans, u64 objectid,
};
int ret = 0;
root = btrfs_create_tree(trans, fs_info, &key);
root = btrfs_create_tree(trans, &key);
if (IS_ERR(root)) {
ret = PTR_ERR(root);
goto out;
@ -1127,7 +1127,7 @@ static int setup_raid_stripe_tree_root(struct btrfs_fs_info *fs_info)
return ret;
}
stripe_root = btrfs_create_tree(trans, fs_info, &key);
stripe_root = btrfs_create_tree(trans, &key);
if (IS_ERR(stripe_root)) {
ret = PTR_ERR(stripe_root);
btrfs_abort_transaction(trans, ret);