Commit 5296c2bf authored by Nikolay Borisov's avatar Nikolay Borisov Committed by David Sterba

btrfs: Remove fs_info parameter from convert_free_space_to_extents

This function always takes a transaction handle which contains a
reference to fs_info. So use that and kill 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 719fb4de
...@@ -316,10 +316,10 @@ int convert_free_space_to_bitmaps(struct btrfs_trans_handle *trans, ...@@ -316,10 +316,10 @@ int convert_free_space_to_bitmaps(struct btrfs_trans_handle *trans,
} }
int convert_free_space_to_extents(struct btrfs_trans_handle *trans, int convert_free_space_to_extents(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_path *path) struct btrfs_path *path)
{ {
struct btrfs_fs_info *fs_info = trans->fs_info;
struct btrfs_root *root = fs_info->free_space_root; struct btrfs_root *root = fs_info->free_space_root;
struct btrfs_free_space_info *info; struct btrfs_free_space_info *info;
struct btrfs_key key, found_key; struct btrfs_key key, found_key;
...@@ -480,8 +480,7 @@ static int update_free_space_extent_count(struct btrfs_trans_handle *trans, ...@@ -480,8 +480,7 @@ static int update_free_space_extent_count(struct btrfs_trans_handle *trans,
ret = convert_free_space_to_bitmaps(trans, block_group, path); ret = convert_free_space_to_bitmaps(trans, block_group, path);
} else if ((flags & BTRFS_FREE_SPACE_USING_BITMAPS) && } else if ((flags & BTRFS_FREE_SPACE_USING_BITMAPS) &&
extent_count < block_group->bitmap_low_thresh) { extent_count < block_group->bitmap_low_thresh) {
ret = convert_free_space_to_extents(trans, fs_info, block_group, ret = convert_free_space_to_extents(trans, block_group, path);
path);
} }
out: out:
......
...@@ -46,7 +46,6 @@ int convert_free_space_to_bitmaps(struct btrfs_trans_handle *trans, ...@@ -46,7 +46,6 @@ int convert_free_space_to_bitmaps(struct btrfs_trans_handle *trans,
struct btrfs_block_group_cache *block_group, struct btrfs_block_group_cache *block_group,
struct btrfs_path *path); struct btrfs_path *path);
int convert_free_space_to_extents(struct btrfs_trans_handle *trans, int convert_free_space_to_extents(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_path *path); struct btrfs_path *path);
int free_space_test_bit(struct btrfs_block_group_cache *block_group, int free_space_test_bit(struct btrfs_block_group_cache *block_group,
......
...@@ -131,7 +131,7 @@ static int check_free_space_extents(struct btrfs_trans_handle *trans, ...@@ -131,7 +131,7 @@ static int check_free_space_extents(struct btrfs_trans_handle *trans,
/* Flip it to the other format and check that for good measure. */ /* Flip it to the other format and check that for good measure. */
if (flags & BTRFS_FREE_SPACE_USING_BITMAPS) { if (flags & BTRFS_FREE_SPACE_USING_BITMAPS) {
ret = convert_free_space_to_extents(trans, fs_info, cache, path); ret = convert_free_space_to_extents(trans, cache, path);
if (ret) { if (ret) {
test_msg("Could not convert to extents\n"); test_msg("Could not convert to extents\n");
return ret; return 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