summaryrefslogtreecommitdiffstats
path: root/fs/btrfs/volumes.c
diff options
context:
space:
mode:
authorNikolay Borisov2018-06-20 14:49:06 +0200
committerDavid Sterba2018-08-06 13:12:36 +0200
commitc216b2039aa06f9be23a9f385cb2d2f6434927d7 (patch)
treeb4967b2da91f9b162a2fdb2a58236f3d2b9e4a30 /fs/btrfs/volumes.c
parentbtrfs: Remove fs_info from do_chunk_alloc (diff)
downloadkernel-qcow2-linux-c216b2039aa06f9be23a9f385cb2d2f6434927d7.tar.gz
kernel-qcow2-linux-c216b2039aa06f9be23a9f385cb2d2f6434927d7.tar.xz
kernel-qcow2-linux-c216b2039aa06f9be23a9f385cb2d2f6434927d7.zip
btrfs: Remove fs_info from btrfs_alloc_chunk
It can be referenced from trans since the function is always called within a transaction. Signed-off-by: Nikolay Borisov <nborisov@suse.com> Reviewed-by: Qu Wenruo <wqu@suse.com> Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'fs/btrfs/volumes.c')
-rw-r--r--fs/btrfs/volumes.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/fs/btrfs/volumes.c b/fs/btrfs/volumes.c
index ff7c8cdacd85..4a7423294270 100644
--- a/fs/btrfs/volumes.c
+++ b/fs/btrfs/volumes.c
@@ -5038,13 +5038,12 @@ out:
* require modifying the chunk tree. This division is important for the
* bootstrap process of adding storage to a seed btrfs.
*/
-int btrfs_alloc_chunk(struct btrfs_trans_handle *trans,
- struct btrfs_fs_info *fs_info, u64 type)
+int btrfs_alloc_chunk(struct btrfs_trans_handle *trans, u64 type)
{
u64 chunk_offset;
- lockdep_assert_held(&fs_info->chunk_mutex);
- chunk_offset = find_next_chunk(fs_info);
+ lockdep_assert_held(&trans->fs_info->chunk_mutex);
+ chunk_offset = find_next_chunk(trans->fs_info);
return __btrfs_alloc_chunk(trans, chunk_offset, type);
}