diff options
author | Josef Bacik <josef@toxicpanda.com> | 2022-07-15 15:45:23 -0400 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2022-09-26 12:27:54 +0200 |
commit | 723de71d41f50709eaf2eef1b08aa409687a3c97 (patch) | |
tree | 3353865eb66ededaa5cd2d1986ae9e8f54c07978 /fs/btrfs/space-info.h | |
parent | 9d4b0a129a0d081821f21edccad154f8e2a1b747 (diff) | |
download | lwn-723de71d41f50709eaf2eef1b08aa409687a3c97.tar.gz lwn-723de71d41f50709eaf2eef1b08aa409687a3c97.zip |
btrfs: handle space_info setting of bg in btrfs_add_bg_to_space_info
We previously had the pattern of
btrfs_update_space_info(all, the, bg, fields, &space_info);
link_block_group(bg);
bg->space_info = space_info;
Now that we're passing the bg into btrfs_add_bg_to_space_info we can do
the linking in that function, transforming this to simply
btrfs_add_bg_to_space_info(fs_info, bg);
and put the link_block_group() and bg->space_info assignment directly in
btrfs_add_bg_to_space_info.
Signed-off-by: Josef Bacik <josef@toxicpanda.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'fs/btrfs/space-info.h')
-rw-r--r-- | fs/btrfs/space-info.h | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/fs/btrfs/space-info.h b/fs/btrfs/space-info.h index 101e83828ee5..2039096803ed 100644 --- a/fs/btrfs/space-info.h +++ b/fs/btrfs/space-info.h @@ -124,8 +124,7 @@ DECLARE_SPACE_INFO_UPDATE(bytes_pinned, "pinned"); int btrfs_init_space_info(struct btrfs_fs_info *fs_info); void btrfs_add_bg_to_space_info(struct btrfs_fs_info *info, - struct btrfs_block_group *block_group, - struct btrfs_space_info **space_info); + struct btrfs_block_group *block_group); void btrfs_update_space_info_chunk_size(struct btrfs_space_info *space_info, u64 chunk_size); struct btrfs_space_info *btrfs_find_space_info(struct btrfs_fs_info *info, |