[PATCH 8/8] NVMe: Use schedule_timeout for sync commands

Keith Busch keith.busch at intel.com
Wed Feb 20 18:52:45 EST 2013


Schedule a timeout for sync commands should the controller fail to return
status and the device is not being polled for timed out commands. This
could happen when a device's queues are being deleted.

Signed-off-by: Keith Busch <keith.busch at intel.com>
---
 drivers/block/nvme.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/block/nvme.c b/drivers/block/nvme.c
index 120686c..dfb2e57 100644
--- a/drivers/block/nvme.c
+++ b/drivers/block/nvme.c
@@ -755,7 +755,7 @@ static int nvme_submit_sync_cmd(struct nvme_queue *nvmeq,
 
 	set_current_state(TASK_KILLABLE);
 	nvme_submit_cmd(nvmeq, cmd);
-	schedule();
+	schedule_timeout(timeout);
 
 	if (cmdinfo.status == -EINTR) {
 		nvme_abort_command(nvmeq, cmdid);
-- 
1.7.0.4




More information about the Linux-nvme mailing list