diff options
author | Nikolay Borisov <nborisov@suse.com> | 2018-07-20 12:37:52 -0400 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2018-08-06 07:12:57 -0400 |
commit | f4208794d02e74f16e5744fe2fe294d7f71fa0f9 (patch) | |
tree | 617a2cf844dc2fb073a1b7267934c3f7f3d324a2 | |
parent | 4f5ad7bd6315528ed50a11d53c66854a5d16425b (diff) |
btrfs: Remove fs_info form btrfs_free_chunk
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>
-rw-r--r-- | fs/btrfs/volumes.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/fs/btrfs/volumes.c b/fs/btrfs/volumes.c index 45d7c37050ce..991022f5219f 100644 --- a/fs/btrfs/volumes.c +++ b/fs/btrfs/volumes.c | |||
@@ -2605,9 +2605,9 @@ int btrfs_grow_device(struct btrfs_trans_handle *trans, | |||
2605 | return btrfs_update_device(trans, device); | 2605 | return btrfs_update_device(trans, device); |
2606 | } | 2606 | } |
2607 | 2607 | ||
2608 | static int btrfs_free_chunk(struct btrfs_trans_handle *trans, | 2608 | static int btrfs_free_chunk(struct btrfs_trans_handle *trans, u64 chunk_offset) |
2609 | struct btrfs_fs_info *fs_info, u64 chunk_offset) | ||
2610 | { | 2609 | { |
2610 | struct btrfs_fs_info *fs_info = trans->fs_info; | ||
2611 | struct btrfs_root *root = fs_info->chunk_root; | 2611 | struct btrfs_root *root = fs_info->chunk_root; |
2612 | int ret; | 2612 | int ret; |
2613 | struct btrfs_path *path; | 2613 | struct btrfs_path *path; |
@@ -2777,7 +2777,7 @@ int btrfs_remove_chunk(struct btrfs_trans_handle *trans, | |||
2777 | } | 2777 | } |
2778 | mutex_unlock(&fs_devices->device_list_mutex); | 2778 | mutex_unlock(&fs_devices->device_list_mutex); |
2779 | 2779 | ||
2780 | ret = btrfs_free_chunk(trans, fs_info, chunk_offset); | 2780 | ret = btrfs_free_chunk(trans, chunk_offset); |
2781 | if (ret) { | 2781 | if (ret) { |
2782 | btrfs_abort_transaction(trans, ret); | 2782 | btrfs_abort_transaction(trans, ret); |
2783 | goto out; | 2783 | goto out; |