NVMe: Don't use fake status on cancelled command

Synchronized commands do different things for timed out commands
vs. controller returned errors.

Signed-off-by: Keith Busch <keith.busch@intel.com>
Signed-off-by: Jens Axboe <axboe@fb.com>
This commit is contained in:
Keith Busch 2015-06-08 10:08:14 -06:00 committed by Jens Axboe
parent 4af0e21caf
commit 17188bb403

View File

@ -613,7 +613,10 @@ static void req_completion(struct nvme_queue *nvmeq, void *ctx,
return;
}
if (req->cmd_type == REQ_TYPE_DRV_PRIV) {
req->errors = status;
if (cmd_rq->ctx == CMD_CTX_CANCELLED)
req->errors = -EINTR;
else
req->errors = status;
} else {
req->errors = nvme_error_status(status);
}