A requeue means we go through nvme_fc_start_fcp_op again and get
another controller reference. To make sure the refcount doesn't
leak we also need to drop it for every completion that came from
the LLDD.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Sagi Grimberg <sagi@grimberg.me>
Signed-off-by: Jens Axboe <axboe@fb.com>
if (nvme_req_needs_retry(rq, rq->errors)) {
rq->retries++;
nvme_requeue_req(rq);
- return;
+ goto put_ctrl;
}
if (blk_rq_is_passthrough(rq))
error = nvme_error_status(rq->errors);
}
+ blk_mq_end_request(rq, error);
+put_ctrl:
nvme_fc_ctrl_put(ctrl);
- blk_mq_end_request(rq, error);
}
static const struct blk_mq_ops nvme_fc_mq_ops = {