From 387caa5a2b11ecb1abbbec8ef9d798f757ba3e5f Mon Sep 17 00:00:00 2001 From: Keith Busch Date: Mon, 22 Sep 2014 13:46:19 -0600 Subject: [PATCH] NVMe: Fix device probe waiting on kthread If we ever do parallel device probing, we need to wake up all processes waiting for nvme kthread to start, not just one. This is currently serialized so the bug is not reachable today, but fixing this anyway in the hopes we implement parallel or asynchronous probe in the future. Signed-off-by: Keith Busch Signed-off-by: Matthew Wilcox Signed-off-by: Jens Axboe --- drivers/block/nvme-core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/block/nvme-core.c b/drivers/block/nvme-core.c index 70be3a151eb7..0196fce0ddf5 100644 --- a/drivers/block/nvme-core.c +++ b/drivers/block/nvme-core.c @@ -2787,7 +2787,7 @@ static int nvme_dev_start(struct nvme_dev *dev) if (start_thread) { nvme_thread = kthread_run(nvme_kthread, NULL, "nvme"); - wake_up(&nvme_kthread_wait); + wake_up_all(&nvme_kthread_wait); } else wait_event_killable(nvme_kthread_wait, nvme_thread); -- 2.34.1