From: Keith Busch Date: Mon, 8 Jun 2015 16:08:14 +0000 (-0600) Subject: NVMe: Don't use fake status on cancelled command X-Git-Tag: v4.2-rc1~66^2~7 X-Git-Url: https://asedeno.scripts.mit.edu/gitweb/?a=commitdiff_plain;h=17188bb403e9098a815dd850aedb6c150d2a3a6b;p=linux.git 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 Signed-off-by: Jens Axboe --- diff --git a/drivers/block/nvme-core.c b/drivers/block/nvme-core.c index a45700312caf..2cbe1b4daef2 100644 --- a/drivers/block/nvme-core.c +++ b/drivers/block/nvme-core.c @@ -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); }