]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
btrfs: remove unnecessary ctl argument from __btrfs_write_out_cache()
authorFilipe Manana <fdmanana@suse.com>
Wed, 15 Apr 2026 14:14:15 +0000 (15:14 +0100)
committerDavid Sterba <dsterba@suse.com>
Mon, 8 Jun 2026 13:53:29 +0000 (15:53 +0200)
We can get the free space control structure from the given block group,
so there is no need to pass it as an argument.

Signed-off-by: Filipe Manana <fdmanana@suse.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/free-space-cache.c

index b2d3d9e048fea03fbf1113eef2a4c532e5b898ab..bb4e10e3e248ca0ddf1259507a75beaf67864c6b 100644 (file)
@@ -1363,10 +1363,10 @@ int btrfs_wait_cache_io(struct btrfs_trans_handle *trans,
  * or an errno if it was not.
  */
 static int __btrfs_write_out_cache(struct inode *inode,
-                                  struct btrfs_free_space_ctl *ctl,
                                   struct btrfs_block_group *block_group,
                                   struct btrfs_trans_handle *trans)
 {
+       struct btrfs_free_space_ctl *ctl = block_group->free_space_ctl;
        struct btrfs_io_ctl *io_ctl = &block_group->io_ctl;
        struct extent_state *cached_state = NULL;
        LIST_HEAD(bitmap_list);
@@ -1512,7 +1512,6 @@ int btrfs_write_out_cache(struct btrfs_trans_handle *trans,
                          struct btrfs_path *path)
 {
        struct btrfs_fs_info *fs_info = trans->fs_info;
-       struct btrfs_free_space_ctl *ctl = block_group->free_space_ctl;
        struct inode *inode;
        int ret = 0;
 
@@ -1527,7 +1526,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, trans);
+       ret = __btrfs_write_out_cache(inode, block_group, trans);
        if (ret) {
                btrfs_debug(fs_info,
          "failed to write free space cache for block group %llu error %d",