Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 014a0d60 authored by Keith Busch's avatar Keith Busch Committed by Jens Axboe
Browse files

NVMe: Delete only created queues



Use the online queue count instead of the number of allocated queues. The
controller should just return an invalid queue identifier error to the
commands if a queue wasn't created. While it's not harmful, it's still
not correct.

Reported-by: default avatarSaar Gross <saar@annapurnalabs.com>
Signed-off-by: default avatarKeith Busch <keith.busch@intel.com>
Reviewed-by: default avatarChristoph Hellwig <hch@lst.de>
Signed-off-by: default avatarJens Axboe <axboe@fb.com>
parent 2800b8e7
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -1551,12 +1551,12 @@ static int nvme_delete_queue(struct nvme_queue *nvmeq, u8 opcode)

static void nvme_disable_io_queues(struct nvme_dev *dev)
{
	int pass;
	int pass, queues = dev->online_queues - 1;
	unsigned long timeout;
	u8 opcode = nvme_admin_delete_sq;

	for (pass = 0; pass < 2; pass++) {
		int sent = 0, i = dev->queue_count - 1;
		int sent = 0, i = queues;

		reinit_completion(&dev->ioq_wait);
 retry: