diff options
author | Maurizio Lombardi <mlombard@redhat.com> | 2025-03-31 18:28:59 +0200 |
---|---|---|
committer | Keith Busch <kbusch@kernel.org> | 2025-04-01 09:01:06 -0700 |
commit | 288ff0d10beb069355036355d5f7612579dc869c (patch) | |
tree | 9f0102ae23fdf44c4837478305c497011454cdb3 | |
parent | 32c928142c4f2db5f9c11aa1fcc4de49d3f27fcd (diff) |
nvme-pci: skip nvme_write_sq_db on empty rqlist
nvme_submit_cmds() should check the rqlist before calling
nvme_write_sq_db(); if the list is empty, it must return immediately.
Fixes: beadf0088501 ("nvme-pci: reverse request order in nvme_queue_rqs")
Signed-off-by: Maurizio Lombardi <mlombard@redhat.com>
Signed-off-by: Keith Busch <kbusch@kernel.org>
-rw-r--r-- | drivers/nvme/host/pci.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/nvme/host/pci.c b/drivers/nvme/host/pci.c index 2883d17ee1eb0..b178d52eac1b7 100644 --- a/drivers/nvme/host/pci.c +++ b/drivers/nvme/host/pci.c @@ -986,6 +986,9 @@ static void nvme_submit_cmds(struct nvme_queue *nvmeq, struct rq_list *rqlist) { struct request *req; + if (rq_list_empty(rqlist)) + return; + spin_lock(&nvmeq->sq_lock); while ((req = rq_list_pop(rqlist))) { struct nvme_iod *iod = blk_mq_rq_to_pdu(req); |