nvme-pci: Fix queue double allocations
authorKeith Busch <keith.busch@intel.com>
Tue, 23 Jan 2018 16:16:19 +0000 (09:16 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 9 Aug 2018 10:16:39 +0000 (12:16 +0200)
commit4af9c61ad953ccc7dbd059a45e77e84db563bd41
tree92e8be9b6dee7c461e4be4264345224c6ab904c2
parent12c058df827213dcbbc42645fd5bcafb4057fb27
nvme-pci: Fix queue double allocations

commit 62314e405fa101dbb82563394f9dfc225e3f1167 upstream.

The queue count says the highest queue that's been allocated, so don't
reallocate a queue lower than that.

Fixes: 147b27e4bd0 ("nvme-pci: allocate device queues storage space at probe")
Signed-off-by: Keith Busch <keith.busch@intel.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Jon Derrick <jonathan.derrick@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/nvme/host/pci.c