aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--fs/btrfs/extent-tree.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/fs/btrfs/extent-tree.c b/fs/btrfs/extent-tree.c
index a4e36c38b81e..3bed6a7e4b22 100644
--- a/fs/btrfs/extent-tree.c
+++ b/fs/btrfs/extent-tree.c
@@ -5952,9 +5952,11 @@ int btrfs_remove_block_group(struct btrfs_trans_handle *trans,
5952 path = btrfs_alloc_path(); 5952 path = btrfs_alloc_path();
5953 BUG_ON(!path); 5953 BUG_ON(!path);
5954 5954
5955 btrfs_remove_free_space_cache(block_group); 5955 spin_lock(&root->fs_info->block_group_cache_lock);
5956 rb_erase(&block_group->cache_node, 5956 rb_erase(&block_group->cache_node,
5957 &root->fs_info->block_group_cache_tree); 5957 &root->fs_info->block_group_cache_tree);
5958 spin_unlock(&root->fs_info->block_group_cache_lock);
5959 btrfs_remove_free_space_cache(block_group);
5958 down_write(&block_group->space_info->groups_sem); 5960 down_write(&block_group->space_info->groups_sem);
5959 list_del(&block_group->list); 5961 list_del(&block_group->list);
5960 up_write(&block_group->space_info->groups_sem); 5962 up_write(&block_group->space_info->groups_sem);