summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohannes Thumshirn <johannes.thumshirn@wdc.com>2026-01-20 09:19:46 +0100
committerDavid Sterba <dsterba@suse.com>2026-02-03 07:54:37 +0100
commitde62f138f95eacd71121d9fdc4815cb90a56ccbd (patch)
tree0e553c8e646f862dadefcd1faa55924189423f9f
parentea7ab405c55b6ac4b5c3e61ef37cf697067e3c71 (diff)
btrfs: don't pass io_ctl to __btrfs_write_out_cache()
There's no need to pass both the block_group and block_group::io_ctl to __btrfs_write_out_cache(). Remove passing io_ctl to __btrfs_write_out_cache() and dereference it inside __btrfs_write_out_cache(). Reviewed-by: Filipe Manana <fdmanana@suse.com> Signed-off-by: Johannes Thumshirn <johannes.thumshirn@wdc.com> Reviewed-by: David Sterba <dsterba@suse.com> Signed-off-by: David Sterba <dsterba@suse.com>
-rw-r--r--fs/btrfs/free-space-cache.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/fs/btrfs/free-space-cache.c b/fs/btrfs/free-space-cache.c
index 8dd15865ab0a..6fb813cc224b 100644
--- a/fs/btrfs/free-space-cache.c
+++ b/fs/btrfs/free-space-cache.c
@@ -1372,9 +1372,9 @@ int btrfs_wait_cache_io(struct btrfs_trans_handle *trans,
static int __btrfs_write_out_cache(struct inode *inode,
struct btrfs_free_space_ctl *ctl,
struct btrfs_block_group *block_group,
- struct btrfs_io_ctl *io_ctl,
struct btrfs_trans_handle *trans)
{
+ struct btrfs_io_ctl *io_ctl = &block_group->io_ctl;
struct extent_state *cached_state = NULL;
LIST_HEAD(bitmap_list);
int entries = 0;
@@ -1534,8 +1534,7 @@ int btrfs_write_out_cache(struct btrfs_trans_handle *trans,
if (IS_ERR(inode))
return 0;
- ret = __btrfs_write_out_cache(inode, ctl, block_group,
- &block_group->io_ctl, trans);
+ ret = __btrfs_write_out_cache(inode, ctl, block_group, trans);
if (ret) {
btrfs_debug(fs_info,
"failed to write free space cache for block group %llu error %d",