btrfs: Remove fs_info form btrfs_free_chunk
authorNikolay Borisov <nborisov@suse.com>
Fri, 20 Jul 2018 16:37:52 +0000 (19:37 +0300)
committerDavid Sterba <dsterba@suse.com>
Mon, 6 Aug 2018 11:12:57 +0000 (13:12 +0200)
It can be referenced from the passed transaction handle.

Signed-off-by: Nikolay Borisov <nborisov@suse.com>
Reviewed-by: Lu Fengqi <lufq.fnst@cn.fujitsu.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/volumes.c

index 45d7c37050ceec0ed38ecb49bc01878535b4c3db..991022f5219f522e993d941a3915effc192bbf97 100644 (file)
@@ -2605,9 +2605,9 @@ int btrfs_grow_device(struct btrfs_trans_handle *trans,
        return btrfs_update_device(trans, device);
 }
 
-static int btrfs_free_chunk(struct btrfs_trans_handle *trans,
-                           struct btrfs_fs_info *fs_info, u64 chunk_offset)
+static int btrfs_free_chunk(struct btrfs_trans_handle *trans, u64 chunk_offset)
 {
+       struct btrfs_fs_info *fs_info = trans->fs_info;
        struct btrfs_root *root = fs_info->chunk_root;
        int ret;
        struct btrfs_path *path;
@@ -2777,7 +2777,7 @@ int btrfs_remove_chunk(struct btrfs_trans_handle *trans,
        }
        mutex_unlock(&fs_devices->device_list_mutex);
 
-       ret = btrfs_free_chunk(trans, fs_info, chunk_offset);
+       ret = btrfs_free_chunk(trans, chunk_offset);
        if (ret) {
                btrfs_abort_transaction(trans, ret);
                goto out;