md: use msleep() in md_notify_reboot()
authorEric Dumazet <edumazet@google.com>
Thu, 3 Mar 2022 23:19:33 +0000 (15:19 -0800)
committerSong Liu <song@kernel.org>
Tue, 8 Mar 2022 23:20:21 +0000 (15:20 -0800)
Calling mdelay(1000) from process context, even while a reboot
is in progress, does not make sense.

Using msleep() allows other threads to make progress.

Signed-off-by: Eric Dumazet <edumazet@google.com>
Cc: linux-raid@vger.kernel.org
Signed-off-by: Song Liu <song@kernel.org>
drivers/md/md.c

index f88a9e9..d059e21 100644 (file)
@@ -9582,7 +9582,7 @@ static int md_notify_reboot(struct notifier_block *this,
         * driver, we do want to have a safe RAID driver ...
         */
        if (need_delay)
-               mdelay(1000*1);
+               msleep(1000);
 
        return NOTIFY_DONE;
 }