scsi: core: Rework scsi_single_lun_run()
authorBart Van Assche <bvanassche@acm.org>
Sat, 15 Oct 2022 00:24:15 +0000 (17:24 -0700)
committerMartin K. Petersen <martin.petersen@oracle.com>
Tue, 18 Oct 2022 03:17:09 +0000 (03:17 +0000)
commitd460f624059266c2e7f0280bdd3ae806d4b75211
treebd40a9a5ab11d05fcdf96e88057e360b05712ace
parent036abd6140078b4125f60e731f28e15de708f87d
scsi: core: Rework scsi_single_lun_run()

Use __starget_for_each_device() instead of open-coding
starget_for_each_device(). Run the queues asynchronously instead of
synchronously.

This commit removes code that calls scsi_device_put() from atomic context.

Cc: Christoph Hellwig <hch@lst.de>
Cc: Ming Lei <ming.lei@redhat.com>
Cc: Hannes Reinecke <hare@suse.de>
Cc: John Garry <john.garry@huawei.com>
Cc: Mike Christie <michael.christie@oracle.com>
Cc: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: Bart Van Assche <bvanassche@acm.org>
Link: https://lore.kernel.org/r/20221015002418.30955-6-bvanassche@acm.org
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/scsi_lib.c