diff --git a/drivers/block/nvme-core.c b/drivers/block/nvme-core.c index a45700312cafdbb0de92622def6f7e91c580dd2f..2cbe1b4daef277d8bddd21451c5bfd65b48c2a70 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); }