summaryrefslogtreecommitdiff
path: root/drivers/block/nvme-core.c
diff options
context:
space:
mode:
authorKeith Busch <keith.busch@intel.com>2013-04-20 00:11:06 +0400
committerMatthew Wilcox <matthew.r.wilcox@intel.com>2013-05-02 23:36:02 +0400
commit78f8d2577bd79ce9d62f4d9e6d3b895bd1dd1d1d (patch)
tree95cd85a20e7b352a9d8810f831cd79f82061e54b /drivers/block/nvme-core.c
parentf410c680b5344f1cb63ff011c6ae3d4963f45c30 (diff)
downloadlinux-78f8d2577bd79ce9d62f4d9e6d3b895bd1dd1d1d.tar.xz
NVMe: Schedule timeout for sync commands
Schedule a timeout on sync commands in case the command times out and the device is not being polled for timeouts. This prevents device removal from hanging forever if the device has stopped responding. Signed-off-by: Keith Busch <keith.busch@intel.com> Signed-off-by: Matthew Wilcox <matthew.r.wilcox@intel.com>
Diffstat (limited to 'drivers/block/nvme-core.c')
-rw-r--r--drivers/block/nvme-core.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/block/nvme-core.c b/drivers/block/nvme-core.c
index 5a3f2235892a..a232dfc1cd4a 100644
--- a/drivers/block/nvme-core.c
+++ b/drivers/block/nvme-core.c
@@ -828,7 +828,7 @@ int nvme_submit_sync_cmd(struct nvme_queue *nvmeq, struct nvme_command *cmd,
set_current_state(TASK_KILLABLE);
nvme_submit_cmd(nvmeq, cmd);
- schedule();
+ schedule_timeout(timeout);
if (cmdinfo.status == -EINTR) {
nvme_abort_command(nvmeq, cmdid);