|
@@ -8980,7 +8980,14 @@ static __exit void md_exit(void)
|
|
|
|
|
|
|
|
for_each_mddev(mddev, tmp) {
|
|
for_each_mddev(mddev, tmp) {
|
|
|
export_array(mddev);
|
|
export_array(mddev);
|
|
|
|
|
+ mddev->ctime = 0;
|
|
|
mddev->hold_active = 0;
|
|
mddev->hold_active = 0;
|
|
|
|
|
+ /*
|
|
|
|
|
+ * for_each_mddev() will call mddev_put() at the end of each
|
|
|
|
|
+ * iteration. As the mddev is now fully clear, this will
|
|
|
|
|
+ * schedule the mddev for destruction by a workqueue, and the
|
|
|
|
|
+ * destroy_workqueue() below will wait for that to complete.
|
|
|
|
|
+ */
|
|
|
}
|
|
}
|
|
|
destroy_workqueue(md_misc_wq);
|
|
destroy_workqueue(md_misc_wq);
|
|
|
destroy_workqueue(md_wq);
|
|
destroy_workqueue(md_wq);
|