NVMe: Use requested sync command timeout
authorKeith Busch <keith.busch@intel.com>
Thu, 28 May 2015 15:48:54 +0000 (09:48 -0600)
committerJens Axboe <axboe@fb.com>
Fri, 29 May 2015 16:10:29 +0000 (10:10 -0600)
Signed-off-by: Keith Busch <keith.busch@intel.com>
Signed-off-by: Jens Axboe <axboe@fb.com>
drivers/block/nvme-core.c

index c42bc53f37656f6a4794b6bbbbf95db8143c899b..4eb9917b2a7a42f326efeb5551869ee77f07aa12 100644 (file)
@@ -1014,7 +1014,7 @@ int __nvme_submit_sync_cmd(struct request_queue *q, struct nvme_command *cmd,
        req->__sector = (sector_t) -1;
        req->bio = req->biotail = NULL;
 
-       req->timeout = ADMIN_TIMEOUT;
+       req->timeout = timeout ? timeout : ADMIN_TIMEOUT;
 
        req->cmd = (unsigned char *)cmd;
        req->cmd_len = sizeof(struct nvme_command);