scsi: core: Add comment to target_destroy in scsi_host_template
authorWenchao Hao <haowenchao2@huawei.com>
Wed, 18 Oct 2023 11:37:46 +0000 (19:37 +0800)
committerMartin K. Petersen <martin.petersen@oracle.com>
Wed, 25 Oct 2023 02:31:04 +0000 (22:31 -0400)
Add comment to indicate that the callback function target_destroy in the
scsi_host_template must not sleep.

Signed-off-by: Wenchao Hao <haowenchao2@huawei.com>
Link: https://lore.kernel.org/r/20231018113746.1940197-3-haowenchao2@huawei.com
Reviewed-by: Bart Van Assche <bvanassche@acm.org>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
include/scsi/scsi_host.h

index 49f768d0ff370b3f7aa67666b1f75444e55f1ee3..2c61dd30d76670e5609b67ecef953b54b82bb73a 100644 (file)
@@ -245,6 +245,9 @@ struct scsi_host_template {
         * midlayer calls this point so that the driver may deallocate
         * and terminate any references to the target.
         *
+        * Note: This callback is called with the host lock held and hence
+        * must not sleep.
+        *
         * Status: OPTIONAL
         */
        void (* target_destroy)(struct scsi_target *);