if (cache->disk_cache_state == BTRFS_DC_SETUP) {
                        cache->io_ctl.inode = NULL;
-                       ret = btrfs_write_out_cache(fs_info, trans,
-                                                   cache, path);
+                       ret = btrfs_write_out_cache(trans, cache, path);
                        if (ret == 0 && cache->io_ctl.inode) {
                                num_started++;
                                should_put = 0;
 
                if (!ret && cache->disk_cache_state == BTRFS_DC_SETUP) {
                        cache->io_ctl.inode = NULL;
-                       ret = btrfs_write_out_cache(fs_info, trans,
-                                                   cache, path);
+                       ret = btrfs_write_out_cache(trans, cache, path);
                        if (ret == 0 && cache->io_ctl.inode) {
                                num_started++;
                                should_put = 0;
 
        goto out;
 }
 
-int btrfs_write_out_cache(struct btrfs_fs_info *fs_info,
-                         struct btrfs_trans_handle *trans,
+int btrfs_write_out_cache(struct btrfs_trans_handle *trans,
                          struct btrfs_block_group_cache *block_group,
                          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;
 
 int btrfs_wait_cache_io(struct btrfs_trans_handle *trans,
                        struct btrfs_block_group_cache *block_group,
                        struct btrfs_path *path);
-int btrfs_write_out_cache(struct btrfs_fs_info *fs_info,
-                         struct btrfs_trans_handle *trans,
+int btrfs_write_out_cache(struct btrfs_trans_handle *trans,
                          struct btrfs_block_group_cache *block_group,
                          struct btrfs_path *path);
 struct inode *lookup_free_ino_inode(struct btrfs_root *root,