Blob Blame History Raw
From 7d959f6e978cbbca90e26a192cc39480e977182f Mon Sep 17 00:00:00 2001
From: Eric Dumazet <edumazet@google.com>
Date: Thu, 3 Mar 2022 15:19:33 -0800
Subject: [PATCH] md: use msleep() in md_notify_reboot()
Git-commit: 7d959f6e978cbbca90e26a192cc39480e977182f
Patch-mainline: v5.18-rc1
References: jsc#PED-2766

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>
Signed-off-by: Coly Li <colyli@suse.de>

---
 drivers/md/md.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/md/md.c b/drivers/md/md.c
index f88a9e948f3e..d059e21f3c35 100644
--- a/drivers/md/md.c
+++ b/drivers/md/md.c
@@ -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;
 }
-- 
2.35.3