mirror of
https://github.com/torvalds/linux.git
synced 2026-07-31 11:37:06 +02:00
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: beadf00885 ("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>
This commit is contained in:
parent
32c928142c
commit
288ff0d10b
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user