md: use msleep() in md_notify_reboot()

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>
This commit is contained in:
Eric Dumazet 2022-03-03 15:19:33 -08:00 committed by Song Liu
parent 5b401e4e9a
commit 7d959f6e97
1 changed files with 1 additions and 1 deletions

View 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;
}