From: Sagi Grimberg Date: Wed, 29 Mar 2017 17:54:15 +0000 (+0300) Subject: nvme-loop: increment request retries counter before requeuing X-Git-Url: http://git.cdn.openwrt.org/?a=commitdiff_plain;h=7d9a5e7176c60673b283bdb0e507d288b48d9528;p=openwrt%2Fstaging%2Fblogic.git nvme-loop: increment request retries counter before requeuing This way our max retry limit holds as well. Signed-off-by: Sagi Grimberg Reviewed-by: Max Gurtovoy Reviewed-by: Christoph Hellwig Signed-off-by: Jens Axboe --- diff --git a/drivers/nvme/target/loop.c b/drivers/nvme/target/loop.c index 35314d96b4db..88a1927bcf6f 100644 --- a/drivers/nvme/target/loop.c +++ b/drivers/nvme/target/loop.c @@ -98,6 +98,7 @@ static void nvme_loop_complete_rq(struct request *req) if (unlikely(req->errors)) { if (nvme_req_needs_retry(req, req->errors)) { + req->retries++; nvme_requeue_req(req); return; }