X-Git-Url: http://git.alex.org.uk diff --git a/drivers/md/md.c b/drivers/md/md.c index 6f37aa4..065ab4f 100644 --- a/drivers/md/md.c +++ b/drivers/md/md.c @@ -8100,7 +8100,8 @@ static int md_notify_reboot(struct notifier_block *this, for_each_mddev(mddev, tmp) { if (mddev_trylock(mddev)) { - __md_stop_writes(mddev); + if (mddev->pers) + __md_stop_writes(mddev); mddev->safemode = 2; mddev_unlock(mddev); }