Skip to content

Commit 20faaab

Browse files
fdmananakdave
authored andcommitted
btrfs: remove unnecessary fs_info argument from delete_block_group_cache()
The fs_info can be taken from the given block group, so there is no need to pass it as an argument. Signed-off-by: Filipe Manana <[email protected]> Reviewed-by: David Sterba <[email protected]> Signed-off-by: David Sterba <[email protected]>
1 parent f75a043 commit 20faaab

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

fs/btrfs/relocation.c

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3239,11 +3239,11 @@ static int __add_tree_block(struct reloc_control *rc,
32393239
return ret;
32403240
}
32413241

3242-
static int delete_block_group_cache(struct btrfs_fs_info *fs_info,
3243-
struct btrfs_block_group *block_group,
3242+
static int delete_block_group_cache(struct btrfs_block_group *block_group,
32443243
struct inode *inode,
32453244
u64 ino)
32463245
{
3246+
struct btrfs_fs_info *fs_info = block_group->fs_info;
32473247
struct btrfs_root *root = fs_info->tree_root;
32483248
struct btrfs_trans_handle *trans;
32493249
struct btrfs_inode *btrfs_inode;
@@ -3315,8 +3315,7 @@ static int delete_v1_space_cache(struct extent_buffer *leaf,
33153315
}
33163316
if (!found)
33173317
return -ENOENT;
3318-
ret = delete_block_group_cache(leaf->fs_info, block_group, NULL,
3319-
space_cache_ino);
3318+
ret = delete_block_group_cache(block_group, NULL, space_cache_ino);
33203319
return ret;
33213320
}
33223321

@@ -3980,7 +3979,7 @@ int btrfs_relocate_block_group(struct btrfs_fs_info *fs_info, u64 group_start)
39803979
btrfs_free_path(path);
39813980

39823981
if (!IS_ERR(inode))
3983-
ret = delete_block_group_cache(fs_info, rc->block_group, inode, 0);
3982+
ret = delete_block_group_cache(rc->block_group, inode, 0);
39843983
else
39853984
ret = PTR_ERR(inode);
39863985

0 commit comments

Comments
 (0)