[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1607657052-17608-1-git-send-email-yejune.deng@gmail.com>
Date:   Fri, 11 Dec 2020 11:24:12 +0800
From:   Yejune Deng <yejune.deng@...il.com>
To:     axboe@...nel.dk, hare@...e.de, jack@...e.cz,
        gregkh@...uxfoundation.org, tj@...nel.org,
        linux@...inikbrodowski.net
Cc:     yejune.deng@...il.com, linux-kernel@...r.kernel.org
Subject: [PATCH] init:  fix msleep() is not accurate
See Documentation/timers/timers-howto.rst, msleep() is not
for (1ms - 20ms),use usleep_range() instead.
Signed-off-by: Yejune Deng <yejune.deng@...il.com>
---
 init/do_mounts.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/init/do_mounts.c b/init/do_mounts.c
index a78e44e..e007b47 100644
--- a/init/do_mounts.c
+++ b/init/do_mounts.c
@@ -606,7 +606,7 @@ void __init prepare_namespace(void)
 			saved_root_name);
 		while (driver_probe_done() != 0 ||
 			(ROOT_DEV = name_to_dev_t(saved_root_name)) == 0)
-			msleep(5);
+			usleep_range(5000, 6000);
 		async_synchronize_full();
 	}
 
-- 
1.9.1
Powered by blists - more mailing lists
 
