scsi: core: Don't wait for quiesce in scsi_stop_queue()
authorMartin Wilck <mwilck@suse.com>
Wed, 14 Jun 2023 10:36:13 +0000 (12:36 +0200)
committerMartin K. Petersen <martin.petersen@oracle.com>
Fri, 16 Jun 2023 16:19:59 +0000 (12:19 -0400)
commitd7035b73a73a79a1dc991fad0ee5f784559e81ed
treea5bfdcf61a78cfaa4ac8f6621c84a45a1972d417
parentc5e46f7ad43b0519980020378a2b00b339359968
scsi: core: Don't wait for quiesce in scsi_stop_queue()

scsi_stop_queue() has just two callers, one with and one without
"nowait". As blk_mq_quiesce_queue() comes down to
blk_mq_quiesce_queue_nowait() followed by blk_mq_wait_quiesce_done(), we
might as well open-code this in scsi_device_block().

Also, add a comment explaining why blk_mq_quiesce_queue_nowait() must be
called with the state_mutex held, see
https://lore.kernel.org/linux-scsi/3b8b13bf-a458-827a-b916-07d7eee8ae00@acm.org/.

Signed-off-by: Martin Wilck <mwilck@suse.com>
Link: https://lore.kernel.org/r/20230614103616.31857-5-mwilck@suse.com
Reviewed-by: Hannes Reinecke <hare@suse.de>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/scsi_lib.c