diff options
| author | Nikolay Borisov <nborisov@suse.com> | 2018-06-20 15:49:06 +0300 |
|---|---|---|
| committer | David Sterba <dsterba@suse.com> | 2018-08-06 13:12:36 +0200 |
| commit | c216b2039aa06f9be23a9f385cb2d2f6434927d7 (patch) | |
| tree | b4967b2da91f9b162a2fdb2a58236f3d2b9e4a30 /fs/btrfs/volumes.c | |
| parent | 01458828bb420d6a8f9aa09af2376caab71660b3 (diff) | |
| download | linux-c216b2039aa06f9be23a9f385cb2d2f6434927d7.tar.gz linux-c216b2039aa06f9be23a9f385cb2d2f6434927d7.tar.bz2 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.c | 7 |
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); } |
