summaryrefslogtreecommitdiffstats
path: root/fs/btrfs/extent-tree.c
diff options
context:
space:
mode:
authorChris Mason <clm@fb.com>2016-10-10 13:43:31 -0700
committerChris Mason <clm@fb.com>2016-10-10 13:43:31 -0700
commit19c4d2f994788a954af1aa7e53b0fdb46fd7925a (patch)
tree1c2a40e3866668a68b4bfc4ff774295f3f660bc5 /fs/btrfs/extent-tree.c
parent196e02490c934398f894e5cb0ee1ac8ad13ca576 (diff)
downloadlinux-19c4d2f994788a954af1aa7e53b0fdb46fd7925a.tar.bz2
Revert "btrfs: let btrfs_delete_unused_bgs() to clean relocated bgs"
This reverts commit 5d8eb6fe517583f9c6d5b94faf2254a0207a45c9. When we remove devices, we free the device structures. Delaying btfs_remove_chunk() ends up hitting a use-after-free on them. Signed-off-by: Chris Mason <clm@fb.com>
Diffstat (limited to 'fs/btrfs/extent-tree.c')
-rw-r--r--fs/btrfs/extent-tree.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/btrfs/extent-tree.c b/fs/btrfs/extent-tree.c
index 11802eaaab54..210c94ac8818 100644
--- a/fs/btrfs/extent-tree.c
+++ b/fs/btrfs/extent-tree.c
@@ -10849,7 +10849,7 @@ void btrfs_delete_unused_bgs(struct btrfs_fs_info *fs_info)
spin_lock(&block_group->lock);
if (block_group->reserved ||
btrfs_block_group_used(&block_group->item) ||
- (block_group->ro && !block_group->removed) ||
+ block_group->ro ||
list_is_singular(&block_group->list)) {
/*
* We want to bail if we made new allocations or have