summaryrefslogtreecommitdiffstats
path: root/kernel/drivers/md/md.c
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/drivers/md/md.c')
-rw-r--r--kernel/drivers/md/md.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/kernel/drivers/md/md.c b/kernel/drivers/md/md.c
index e4621511d..e8c44fcb1 100644
--- a/kernel/drivers/md/md.c
+++ b/kernel/drivers/md/md.c
@@ -5365,6 +5365,8 @@ static void __md_stop(struct mddev *mddev)
{
struct md_personality *pers = mddev->pers;
mddev_detach(mddev);
+ /* Ensure ->event_work is done */
+ flush_workqueue(md_misc_wq);
spin_lock(&mddev->lock);
mddev->ready = 0;
mddev->pers = NULL;