Message ID | 20221018135720.670094-4-hch@lst.de (mailing list archive) |
---|---|
State | Not Applicable |
Headers | show |
Series | [1/4] blk-mq: move the call to blk_put_queue out of blk_mq_destroy_queue | expand |
On 10/18/22 06:57, Christoph Hellwig wrote: > Now that blk_mq_destroy_queue does not release the queue reference, there > is no need for a second admin queue reference to be held by the nvme_dev. > > Signed-off-by: Christoph Hellwig <hch@lst.de> > --- Reviewed-by: Chaitanya Kulkarni <kch@nvidia.com> -ck
Reviewed-by: Sagi Grimberg <sagi@grimberg.me>
diff --git a/drivers/nvme/host/pci.c b/drivers/nvme/host/pci.c index 16509b8d92e59..efea468a2a5bb 100644 --- a/drivers/nvme/host/pci.c +++ b/drivers/nvme/host/pci.c @@ -1749,7 +1749,6 @@ static void nvme_dev_remove_admin(struct nvme_dev *dev) */ nvme_start_admin_queue(&dev->ctrl); blk_mq_destroy_queue(dev->ctrl.admin_q); - blk_put_queue(dev->ctrl.admin_q); blk_mq_free_tag_set(&dev->admin_tagset); } } @@ -1778,11 +1777,6 @@ static int nvme_pci_alloc_admin_tag_set(struct nvme_dev *dev) dev->ctrl.admin_q = NULL; return -ENOMEM; } - if (!blk_get_queue(dev->ctrl.admin_q)) { - nvme_dev_remove_admin(dev); - dev->ctrl.admin_q = NULL; - return -ENODEV; - } return 0; }
Now that blk_mq_destroy_queue does not release the queue reference, there is no need for a second admin queue reference to be held by the nvme_dev. Signed-off-by: Christoph Hellwig <hch@lst.de> --- drivers/nvme/host/pci.c | 6 ------ 1 file changed, 6 deletions(-)