aboutsummaryrefslogtreecommitdiffstats
path: root/fs/btrfs
diff options
context:
space:
mode:
Diffstat (limited to 'fs/btrfs')
-rw-r--r--fs/btrfs/extent-tree.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/fs/btrfs/extent-tree.c b/fs/btrfs/extent-tree.c
index 5258923d621f..fe4e11b31a43 100644
--- a/fs/btrfs/extent-tree.c
+++ b/fs/btrfs/extent-tree.c
@@ -3157,9 +3157,13 @@ int btrfs_free_block_groups(struct btrfs_fs_info *info)
3157 block_group = rb_entry(n, struct btrfs_block_group_cache, 3157 block_group = rb_entry(n, struct btrfs_block_group_cache,
3158 cache_node); 3158 cache_node);
3159 3159
3160 spin_unlock(&info->block_group_cache_lock);
3160 btrfs_remove_free_space_cache(block_group); 3161 btrfs_remove_free_space_cache(block_group);
3162 spin_lock(&info->block_group_cache_lock);
3163
3161 rb_erase(&block_group->cache_node, 3164 rb_erase(&block_group->cache_node,
3162 &info->block_group_cache_tree); 3165 &info->block_group_cache_tree);
3166
3163 spin_lock(&block_group->space_info->lock); 3167 spin_lock(&block_group->space_info->lock);
3164 list_del(&block_group->list); 3168 list_del(&block_group->list);
3165 spin_unlock(&block_group->space_info->lock); 3169 spin_unlock(&block_group->space_info->lock);