Skip to content

Commit

Permalink
NVMe: Don't use fake status on cancelled command
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Keith Busch authored and Jens Axboe committed Jun 27, 2015
1 parent 4af0e21 commit 17188bb
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion drivers/block/nvme-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down

0 comments on commit 17188bb

Please sign in to comment.