@@ -8937,8 +8937,7 @@ int rdev_clear_badblocks(struct md_rdev *rdev, sector_t s, int sectors,
}
EXPORT_SYMBOL_GPL(rdev_clear_badblocks);
-static int md_notify_reboot(struct notifier_block *this,
- unsigned long code, void *x)
+static void md_stop_all_writes(void)
{
struct list_head *tmp;
struct mddev *mddev;
@@ -8962,6 +8961,12 @@ static int md_notify_reboot(struct notifier_block *this,
*/
if (need_delay)
mdelay(1000*1);
+}
+
+static int md_notify_reboot(struct notifier_block *this,
+ unsigned long code, void *x)
+{
+ md_stop_all_writes();
return NOTIFY_DONE;
}