Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 17188bb4 authored by Keith Busch's avatar Keith Busch Committed by Jens Axboe
Browse files

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: default avatarKeith Busch <keith.busch@intel.com>
Signed-off-by: default avatarJens Axboe <axboe@fb.com>
parent 4af0e21c
Loading
Loading
Loading
Loading
+4 −1
Original line number Original line Diff line number Diff line
@@ -613,6 +613,9 @@ static void req_completion(struct nvme_queue *nvmeq, void *ctx,
			return;
			return;
		}
		}
		if (req->cmd_type == REQ_TYPE_DRV_PRIV) {
		if (req->cmd_type == REQ_TYPE_DRV_PRIV) {
			if (cmd_rq->ctx == CMD_CTX_CANCELLED)
				req->errors = -EINTR;
			else
				req->errors = status;
				req->errors = status;
		} else {
		} else {
			req->errors = nvme_error_status(status);
			req->errors = nvme_error_status(status);