summaryrefslogtreecommitdiff
path: root/fs/btrfs/free-space-cache.c
diff options
context:
space:
mode:
authorDavid Sterba <dsterba@suse.com>2016-10-04 20:34:27 +0300
committerDavid Sterba <dsterba@suse.com>2016-12-06 18:07:00 +0300
commit34441361c4f52a5f6e41d8de8e5debbeb415dbf0 (patch)
tree1ecdf96fc87c0c297106555b2ad7e1f4e74b2952 /fs/btrfs/free-space-cache.c
parent3a45bb207ee2c5548ebf6f5fcc7d249e141f15e8 (diff)
downloadlinux-34441361c4f52a5f6e41d8de8e5debbeb415dbf0.tar.xz
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/free-space-cache.c')
-rw-r--r--fs/btrfs/free-space-cache.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/btrfs/free-space-cache.c b/fs/btrfs/free-space-cache.c
index 2e8445e4ffa3..7015892c9ee8 100644
--- a/fs/btrfs/free-space-cache.c
+++ b/fs/btrfs/free-space-cache.c
@@ -3352,7 +3352,7 @@ void btrfs_put_block_group_trimming(struct btrfs_block_group_cache *block_group)
spin_unlock(&block_group->lock);
if (cleanup) {
- lock_chunks(fs_info);
+ mutex_lock(&fs_info->chunk_mutex);
em_tree = &fs_info->mapping_tree.map_tree;
write_lock(&em_tree->lock);
em = lookup_extent_mapping(em_tree, block_group->key.objectid,
@@ -3364,7 +3364,7 @@ void btrfs_put_block_group_trimming(struct btrfs_block_group_cache *block_group)
*/
remove_extent_mapping(em_tree, em);
write_unlock(&em_tree->lock);
- unlock_chunks(fs_info);
+ mutex_unlock(&fs_info->chunk_mutex);
/* once for us and once for the tree */
free_extent_map(em);