Commit dc917c36 authored by Christoph Hellwig's avatar Christoph Hellwig Committed by Jens Axboe

scsi: remove an extra queue reference

Now that blk_mq_destroy_queue does not release the queue reference, there
is no need for a second queue reference to be held by the scsi_device.
Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
Reviewed-by: default avatarSagi Grimberg <sagi@grimberg.me>
Reviewed-by: default avatarChaitanya Kulkarni <kch@nvidia.com>
Reviewed-by: default avatarKeith Busch <kbusch@kernel.org>
Link: https://lore.kernel.org/r/20221018135720.670094-3-hch@lst.deSigned-off-by: default avatarJens Axboe <axboe@kernel.dk>
parent 2b3f056f
...@@ -344,7 +344,6 @@ static struct scsi_device *scsi_alloc_sdev(struct scsi_target *starget, ...@@ -344,7 +344,6 @@ static struct scsi_device *scsi_alloc_sdev(struct scsi_target *starget,
sdev->request_queue = q; sdev->request_queue = q;
q->queuedata = sdev; q->queuedata = sdev;
__scsi_init_queue(sdev->host, q); __scsi_init_queue(sdev->host, q);
WARN_ON_ONCE(!blk_get_queue(q));
depth = sdev->host->cmd_per_lun ?: 1; depth = sdev->host->cmd_per_lun ?: 1;
......
...@@ -1486,7 +1486,6 @@ void __scsi_remove_device(struct scsi_device *sdev) ...@@ -1486,7 +1486,6 @@ void __scsi_remove_device(struct scsi_device *sdev)
mutex_unlock(&sdev->state_mutex); mutex_unlock(&sdev->state_mutex);
blk_mq_destroy_queue(sdev->request_queue); blk_mq_destroy_queue(sdev->request_queue);
blk_put_queue(sdev->request_queue);
kref_put(&sdev->host->tagset_refcnt, scsi_mq_free_tags); kref_put(&sdev->host->tagset_refcnt, scsi_mq_free_tags);
cancel_work_sync(&sdev->requeue_work); cancel_work_sync(&sdev->requeue_work);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment