diff options
author | Nikolay Borisov | 2018-06-20 14:49:07 +0200 |
---|---|---|
committer | David Sterba | 2018-08-06 13:12:36 +0200 |
commit | 451a2c130342125ca44dbbf3b62521c3f0041cfb (patch) | |
tree | f5f9ef7bb5fdb26402ba34911ef81d781c109448 /fs/btrfs/extent-tree.c | |
parent | btrfs: Remove fs_info from btrfs_alloc_chunk (diff) | |
download | kernel-qcow2-linux-451a2c130342125ca44dbbf3b62521c3f0041cfb.tar.gz kernel-qcow2-linux-451a2c130342125ca44dbbf3b62521c3f0041cfb.tar.xz kernel-qcow2-linux-451a2c130342125ca44dbbf3b62521c3f0041cfb.zip |
btrfs: Remove fs_info from check_system_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/extent-tree.c')
-rw-r--r-- | fs/btrfs/extent-tree.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/fs/btrfs/extent-tree.c b/fs/btrfs/extent-tree.c index c0928fcb3f32..ca88a86b1c73 100644 --- a/fs/btrfs/extent-tree.c +++ b/fs/btrfs/extent-tree.c @@ -4527,9 +4527,9 @@ static u64 get_profile_num_devs(struct btrfs_fs_info *fs_info, u64 type) * for allocating a chunk, otherwise if it's false, reserve space necessary for * removing a chunk. */ -void check_system_chunk(struct btrfs_trans_handle *trans, - struct btrfs_fs_info *fs_info, u64 type) +void check_system_chunk(struct btrfs_trans_handle *trans, u64 type) { + struct btrfs_fs_info *fs_info = trans->fs_info; struct btrfs_space_info *info; u64 left; u64 thresh; @@ -4668,7 +4668,7 @@ again: * Check if we have enough space in SYSTEM chunk because we may need * to update devices. */ - check_system_chunk(trans, fs_info, flags); + check_system_chunk(trans, flags); ret = btrfs_alloc_chunk(trans, flags); trans->allocating_chunk = false; @@ -9493,7 +9493,7 @@ out: if (cache->flags & BTRFS_BLOCK_GROUP_SYSTEM) { alloc_flags = update_block_group_flags(fs_info, cache->flags); mutex_lock(&fs_info->chunk_mutex); - check_system_chunk(trans, fs_info, alloc_flags); + check_system_chunk(trans, alloc_flags); mutex_unlock(&fs_info->chunk_mutex); } mutex_unlock(&fs_info->ro_block_group_mutex); |