* [PATCH] md: use msleep() in md_notify_reboot()
@ 2022-03-03 23:19 Eric Dumazet
2022-03-04 6:23 ` Song Liu
0 siblings, 1 reply; 2+ messages in thread
From: Eric Dumazet @ 2022-03-03 23:19 UTC (permalink / raw)
To: Song Liu; +Cc: linux-kernel, Eric Dumazet, Eric Dumazet, linux-raid
From: Eric Dumazet <edumazet@google.com>
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
---
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 4d38bd7dadd604acdc9832d62c81c913abddc07d..330c53e212b82dd58670962fc9204cf4eec484f4 100644
--- a/drivers/md/md.c
+++ b/drivers/md/md.c
@@ -9583,7 +9583,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.1.616.g0bdcbb4464-goog
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] md: use msleep() in md_notify_reboot()
2022-03-03 23:19 [PATCH] md: use msleep() in md_notify_reboot() Eric Dumazet
@ 2022-03-04 6:23 ` Song Liu
0 siblings, 0 replies; 2+ messages in thread
From: Song Liu @ 2022-03-04 6:23 UTC (permalink / raw)
To: Eric Dumazet; +Cc: linux-kernel, Eric Dumazet, linux-raid
On Thu, Mar 3, 2022 at 3:19 PM Eric Dumazet <eric.dumazet@gmail.com> wrote:
>
> From: Eric Dumazet <edumazet@google.com>
>
> 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
Applied to md-next. Thanks!
Song
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2022-03-04 6:24 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-03-03 23:19 [PATCH] md: use msleep() in md_notify_reboot() Eric Dumazet
2022-03-04 6:23 ` Song Liu
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®