mirror of
https://github.com/Fishwaldo/linux-bl808.git
synced 2025-06-17 20:25:19 +00:00
Revert "btrfs: let btrfs_delete_unused_bgs() to clean relocated bgs"
This reverts commit 5d8eb6fe51
.
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>
This commit is contained in:
parent
196e02490c
commit
19c4d2f994
2 changed files with 16 additions and 12 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue