summaryrefslogtreecommitdiffstats
path: root/drivers/nvme/host/pci.c
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2020-06-11 08:44:52 +0200
committerJens Axboe <axboe@kernel.dk>2020-06-24 09:15:57 -0600
commitff029451496364eef0d342618dfc9972b78f3392 (patch)
tree6ab48289cb45e1f8e0c5ada8d60f59deb0aa94bc /drivers/nvme/host/pci.c
parent8446546cc21819478542e9d728bce85e39898fc5 (diff)
downloadlinux-ff029451496364eef0d342618dfc9972b78f3392.tar.gz
linux-ff029451496364eef0d342618dfc9972b78f3392.tar.bz2
linux-ff029451496364eef0d342618dfc9972b78f3392.zip
nvme: use blk_mq_complete_request_remote to avoid an indirect function call
Use the new blk_mq_complete_request_remote helper to avoid an indirect function call in the completion fast path. Reviewed-by: Daniel Wagner <dwagner@suse.de> Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'drivers/nvme/host/pci.c')
-rw-r--r--drivers/nvme/host/pci.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/nvme/host/pci.c b/drivers/nvme/host/pci.c
index e2bacd369a88..0b3fedc9c6fe 100644
--- a/drivers/nvme/host/pci.c
+++ b/drivers/nvme/host/pci.c
@@ -963,7 +963,8 @@ static inline void nvme_handle_cqe(struct nvme_queue *nvmeq, u16 idx)
req = blk_mq_tag_to_rq(nvme_queue_tagset(nvmeq), cqe->command_id);
trace_nvme_sq(req, cqe->sq_head, nvmeq->sq_tail);
- nvme_end_request(req, cqe->status, cqe->result);
+ if (!nvme_end_request(req, cqe->status, cqe->result))
+ nvme_pci_complete_rq(req);
}
static inline void nvme_update_cq_head(struct nvme_queue *nvmeq)