Revert "btrfs: wait for fixup workers before stopping cleaner kthread during umount"
This reverts commit cfbf212995
.
This commit is contained in:
parent
57903b8949
commit
7628389383
1 changed files with 0 additions and 11 deletions
|
@ -4131,17 +4131,6 @@ void __cold close_ctree(struct btrfs_fs_info *fs_info)
|
||||||
/* clear out the rbtree of defraggable inodes */
|
/* clear out the rbtree of defraggable inodes */
|
||||||
btrfs_cleanup_defrag_inodes(fs_info);
|
btrfs_cleanup_defrag_inodes(fs_info);
|
||||||
|
|
||||||
/*
|
|
||||||
* Wait for any fixup workers to complete.
|
|
||||||
* If we don't wait for them here and they are still running by the time
|
|
||||||
* we call kthread_stop() against the cleaner kthread further below, we
|
|
||||||
* get an use-after-free on the cleaner because the fixup worker adds an
|
|
||||||
* inode to the list of delayed iputs and then attempts to wakeup the
|
|
||||||
* cleaner kthread, which was already stopped and destroyed. We parked
|
|
||||||
* already the cleaner, but below we run all pending delayed iputs.
|
|
||||||
*/
|
|
||||||
btrfs_flush_workqueue(fs_info->fixup_workers);
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* After we parked the cleaner kthread, ordered extents may have
|
* After we parked the cleaner kthread, ordered extents may have
|
||||||
* completed and created new delayed iputs. If one of the async reclaim
|
* completed and created new delayed iputs. If one of the async reclaim
|
||||||
|
|
Loading…
Reference in a new issue