diff options
author | David Sterba <dsterba@suse.com> | 2016-10-04 19:34:27 +0200 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2016-12-06 16:07:00 +0100 |
commit | 34441361c4f52a5f6e41d8de8e5debbeb415dbf0 (patch) | |
tree | 1ecdf96fc87c0c297106555b2ad7e1f4e74b2952 /fs/btrfs/extent-tree.c | |
parent | 3a45bb207ee2c5548ebf6f5fcc7d249e141f15e8 (diff) |
btrfs: opencode chunk locking, remove helpers
The helpers are trivial and we don't use them consistently.
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 2825019cd18f..e97302f437a1 100644 --- a/fs/btrfs/extent-tree.c +++ b/fs/btrfs/extent-tree.c @@ -9419,9 +9419,9 @@ again: out: if (cache->flags & BTRFS_BLOCK_GROUP_SYSTEM) { alloc_flags = update_block_group_flags(fs_info, cache->flags); - lock_chunks(fs_info); + mutex_lock(&fs_info->chunk_mutex); check_system_chunk(trans, fs_info, alloc_flags); - unlock_chunks(fs_info); + mutex_unlock(&fs_info->chunk_mutex); } mutex_unlock(&fs_info->ro_block_group_mutex); @@ -10458,7 +10458,7 @@ int btrfs_remove_block_group(struct btrfs_trans_handle *trans, memcpy(&key, &block_group->key, sizeof(key)); - lock_chunks(fs_info); + mutex_lock(&fs_info->chunk_mutex); if (!list_empty(&em->list)) { /* We're in the transaction->pending_chunks list. */ free_extent_map(em); @@ -10526,7 +10526,7 @@ int btrfs_remove_block_group(struct btrfs_trans_handle *trans, free_extent_map(em); } - unlock_chunks(fs_info); + mutex_unlock(&fs_info->chunk_mutex); ret = remove_block_group_free_space(trans, fs_info, block_group); if (ret) |