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

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 bb4e10e3e248ca0ddf1259507a75beaf67864c6b..2354cb6fce369e104a777e55604e21164f275c6f 100644 (file)
@@ -1064,12 +1064,12 @@ out:
 
 static noinline_for_stack
 int write_cache_extent_entries(struct btrfs_io_ctl *io_ctl,
-                             struct btrfs_free_space_ctl *ctl,
                              struct btrfs_block_group *block_group,
                              int *entries, int *bitmaps,
                              struct list_head *bitmap_list)
 {
        int ret;
+       struct btrfs_free_space_ctl *ctl = block_group->free_space_ctl;
        struct btrfs_free_cluster *cluster = NULL;
        struct btrfs_free_cluster *cluster_locked = NULL;
        struct rb_node *node = rb_first(&ctl->free_space_offset);
@@ -1412,8 +1412,7 @@ static int __btrfs_write_out_cache(struct inode *inode,
        mutex_lock(&ctl->cache_writeout_mutex);
        /* Write out the extent entries in the free space cache */
        spin_lock(&ctl->tree_lock);
-       ret = write_cache_extent_entries(io_ctl, ctl,
-                                        block_group, &entries, &bitmaps,
+       ret = write_cache_extent_entries(io_ctl, block_group, &entries, &bitmaps,
                                         &bitmap_list);
        if (ret)
                goto out_nospc_locked;