NVMe: Delete only created queues
authorKeith Busch <keith.busch@intel.com>
Fri, 6 May 2016 17:50:52 +0000 (11:50 -0600)
committerJens Axboe <axboe@fb.com>
Tue, 17 May 2016 23:14:21 +0000 (17:14 -0600)
commit014a0d609eb4721d1e416cf10da2d5602f9b34d5
tree114e80a77d807bb2fe52d0c76862773711587ea7
parent2800b8e7d9dfca1fd9d044dcf7a046b5de5a7239
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: Saar Gross <saar@annapurnalabs.com>
Signed-off-by: Keith Busch <keith.busch@intel.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Jens Axboe <axboe@fb.com>
drivers/nvme/host/pci.c