mirror of
https://github.com/raspberrypi/linux.git
synced 2025-12-06 01:49:46 +00:00
nvme-pci: skip nvme_write_sq_db on empty rqlist
[ Upstream commit288ff0d10b] 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> Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
63371be47f
commit
87bbcb73d6
@@ -989,6 +989,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);
|
||||
|
||||
Reference in New Issue
Block a user