mirror of
https://github.com/torvalds/linux.git
synced 2024-12-26 12:52:30 +00:00
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>
This commit is contained in:
parent
f410c680b5
commit
78f8d2577b
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user