btrfs: root->fs_info cleanup, lock/unlock_chunks

Signed-off-by: Jeff Mahoney <jeffm@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
This commit is contained in:
Jeff Mahoney
2016-06-16 11:30:29 -04:00
committed by David Sterba
parent 27965b6c2c
commit 3796d33535
5 changed files with 47 additions and 47 deletions

View File

@@ -3328,7 +3328,7 @@ void btrfs_put_block_group_trimming(struct btrfs_block_group_cache *block_group)
spin_unlock(&block_group->lock);
if (cleanup) {
lock_chunks(block_group->fs_info->chunk_root);
lock_chunks(block_group->fs_info);
em_tree = &block_group->fs_info->mapping_tree.map_tree;
write_lock(&em_tree->lock);
em = lookup_extent_mapping(em_tree, block_group->key.objectid,
@@ -3340,7 +3340,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(block_group->fs_info->chunk_root);
unlock_chunks(block_group->fs_info);
/* once for us and once for the tree */
free_extent_map(em);