Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f4208794 authored by Nikolay Borisov's avatar Nikolay Borisov Committed by David Sterba
Browse files

btrfs: Remove fs_info form btrfs_free_chunk



It can be referenced from the passed transaction handle.

Signed-off-by: default avatarNikolay Borisov <nborisov@suse.com>
Reviewed-by: default avatarLu Fengqi <lufq.fnst@cn.fujitsu.com>
Signed-off-by: default avatarDavid Sterba <dsterba@suse.com>
parent 4f5ad7bd
Loading
Loading
Loading
Loading
+3 −3
Original line number Original line Diff line number Diff line
@@ -2605,9 +2605,9 @@ int btrfs_grow_device(struct btrfs_trans_handle *trans,
	return btrfs_update_device(trans, device);
	return btrfs_update_device(trans, device);
}
}


static int btrfs_free_chunk(struct btrfs_trans_handle *trans,
static int btrfs_free_chunk(struct btrfs_trans_handle *trans, u64 chunk_offset)
			    struct btrfs_fs_info *fs_info, u64 chunk_offset)
{
{
	struct btrfs_fs_info *fs_info = trans->fs_info;
	struct btrfs_root *root = fs_info->chunk_root;
	struct btrfs_root *root = fs_info->chunk_root;
	int ret;
	int ret;
	struct btrfs_path *path;
	struct btrfs_path *path;
@@ -2777,7 +2777,7 @@ int btrfs_remove_chunk(struct btrfs_trans_handle *trans,
	}
	}
	mutex_unlock(&fs_devices->device_list_mutex);
	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) {
	if (ret) {
		btrfs_abort_transaction(trans, ret);
		btrfs_abort_transaction(trans, ret);
		goto out;
		goto out;