Commit 85a7ef13 authored by Nikolay Borisov's avatar Nikolay Borisov Committed by David Sterba

btrfs: Remove fs_info argument from modify_free_space_bitmap

This function already takes a transaction which has a reference to the
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 690d7682
...@@ -577,12 +577,11 @@ static int free_space_next_bitmap(struct btrfs_trans_handle *trans, ...@@ -577,12 +577,11 @@ static int free_space_next_bitmap(struct btrfs_trans_handle *trans,
* the bitmap. * the bitmap.
*/ */
static int modify_free_space_bitmap(struct btrfs_trans_handle *trans, static int modify_free_space_bitmap(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,
u64 start, u64 size, int remove) u64 start, u64 size, int remove)
{ {
struct btrfs_root *root = fs_info->free_space_root; struct btrfs_root *root = block_group->fs_info->free_space_root;
struct btrfs_key key; struct btrfs_key key;
u64 end = start + size; u64 end = start + size;
u64 cur_start, cur_size; u64 cur_start, cur_size;
...@@ -799,8 +798,8 @@ int __remove_from_free_space_tree(struct btrfs_trans_handle *trans, ...@@ -799,8 +798,8 @@ int __remove_from_free_space_tree(struct btrfs_trans_handle *trans,
btrfs_release_path(path); btrfs_release_path(path);
if (flags & BTRFS_FREE_SPACE_USING_BITMAPS) { if (flags & BTRFS_FREE_SPACE_USING_BITMAPS) {
return modify_free_space_bitmap(trans, fs_info, block_group, return modify_free_space_bitmap(trans, block_group, path,
path, start, size, 1); start, size, 1);
} else { } else {
return remove_free_space_extent(trans, fs_info, block_group, return remove_free_space_extent(trans, fs_info, block_group,
path, start, size); path, start, size);
...@@ -994,8 +993,8 @@ int __add_to_free_space_tree(struct btrfs_trans_handle *trans, ...@@ -994,8 +993,8 @@ int __add_to_free_space_tree(struct btrfs_trans_handle *trans,
btrfs_release_path(path); btrfs_release_path(path);
if (flags & BTRFS_FREE_SPACE_USING_BITMAPS) { if (flags & BTRFS_FREE_SPACE_USING_BITMAPS) {
return modify_free_space_bitmap(trans, fs_info, block_group, return modify_free_space_bitmap(trans, block_group, path,
path, start, size, 0); start, size, 0);
} else { } else {
return add_free_space_extent(trans, fs_info, block_group, path, return add_free_space_extent(trans, fs_info, block_group, path,
start, size); start, size);
......
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