Commit c31683a6 authored by Nikolay Borisov's avatar Nikolay Borisov Committed by David Sterba

btrfs: Remove fs_info argument from __remove_from_free_space_tree

This function takes a transaction handle which holds a reference to
fs_info. So use that and remove the extra argument.
Signed-off-by: default avatarNikolay Borisov <nborisov@suse.com>
Reviewed-by: default avatarDavid Sterba <dsterba@suse.com>
Signed-off-by: default avatarDavid Sterba <dsterba@suse.com>
parent e581168d
......@@ -776,7 +776,6 @@ static int remove_free_space_extent(struct btrfs_trans_handle *trans,
}
int __remove_from_free_space_tree(struct btrfs_trans_handle *trans,
struct btrfs_fs_info *fs_info,
struct btrfs_block_group_cache *block_group,
struct btrfs_path *path, u64 start, u64 size)
{
......@@ -790,7 +789,8 @@ int __remove_from_free_space_tree(struct btrfs_trans_handle *trans,
return ret;
}
info = search_free_space_info(NULL, fs_info, block_group, path, 0);
info = search_free_space_info(NULL, trans->fs_info, block_group, path,
0);
if (IS_ERR(info))
return PTR_ERR(info);
flags = btrfs_free_space_flags(path->nodes[0], info);
......@@ -830,8 +830,8 @@ int remove_from_free_space_tree(struct btrfs_trans_handle *trans,
}
mutex_lock(&block_group->free_space_lock);
ret = __remove_from_free_space_tree(trans, fs_info, block_group, path,
start, size);
ret = __remove_from_free_space_tree(trans, block_group, path, start,
size);
mutex_unlock(&block_group->free_space_lock);
btrfs_put_block_group(block_group);
......
......@@ -39,7 +39,6 @@ int __add_to_free_space_tree(struct btrfs_trans_handle *trans,
struct btrfs_block_group_cache *block_group,
struct btrfs_path *path, u64 start, u64 size);
int __remove_from_free_space_tree(struct btrfs_trans_handle *trans,
struct btrfs_fs_info *fs_info,
struct btrfs_block_group_cache *block_group,
struct btrfs_path *path, u64 start, u64 size);
int convert_free_space_to_bitmaps(struct btrfs_trans_handle *trans,
......
......@@ -170,7 +170,7 @@ static int test_remove_all(struct btrfs_trans_handle *trans,
const struct free_space_extent extents[] = {};
int ret;
ret = __remove_from_free_space_tree(trans, fs_info, cache, path,
ret = __remove_from_free_space_tree(trans, cache, path,
cache->key.objectid,
cache->key.offset);
if (ret) {
......@@ -194,7 +194,7 @@ static int test_remove_beginning(struct btrfs_trans_handle *trans,
};
int ret;
ret = __remove_from_free_space_tree(trans, fs_info, cache, path,
ret = __remove_from_free_space_tree(trans, cache, path,
cache->key.objectid, alignment);
if (ret) {
test_msg("Could not remove free space\n");
......@@ -217,7 +217,7 @@ static int test_remove_end(struct btrfs_trans_handle *trans,
};
int ret;
ret = __remove_from_free_space_tree(trans, fs_info, cache, path,
ret = __remove_from_free_space_tree(trans, cache, path,
cache->key.objectid +
cache->key.offset - alignment,
alignment);
......@@ -243,7 +243,7 @@ static int test_remove_middle(struct btrfs_trans_handle *trans,
};
int ret;
ret = __remove_from_free_space_tree(trans, fs_info, cache, path,
ret = __remove_from_free_space_tree(trans, cache, path,
cache->key.objectid + alignment,
alignment);
if (ret) {
......@@ -266,7 +266,7 @@ static int test_merge_left(struct btrfs_trans_handle *trans,
};
int ret;
ret = __remove_from_free_space_tree(trans, fs_info, cache, path,
ret = __remove_from_free_space_tree(trans, cache, path,
cache->key.objectid,
cache->key.offset);
if (ret) {
......@@ -304,7 +304,7 @@ static int test_merge_right(struct btrfs_trans_handle *trans,
};
int ret;
ret = __remove_from_free_space_tree(trans, fs_info, cache, path,
ret = __remove_from_free_space_tree(trans, cache, path,
cache->key.objectid,
cache->key.offset);
if (ret) {
......@@ -343,7 +343,7 @@ static int test_merge_both(struct btrfs_trans_handle *trans,
};
int ret;
ret = __remove_from_free_space_tree(trans, fs_info, cache, path,
ret = __remove_from_free_space_tree(trans, cache, path,
cache->key.objectid,
cache->key.offset);
if (ret) {
......@@ -391,7 +391,7 @@ static int test_merge_none(struct btrfs_trans_handle *trans,
};
int ret;
ret = __remove_from_free_space_tree(trans, fs_info, cache, path,
ret = __remove_from_free_space_tree(trans, cache, path,
cache->key.objectid,
cache->key.offset);
if (ret) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment