diff mbox series

[v3,2/2] scsi: Add comment of target_destroy in scsi_host_template

Message ID 20231018113746.1940197-3-haowenchao2@huawei.com (mailing list archive)
State Accepted
Headers show
Series cleanup patch | expand

Commit Message

Wenchao Hao Oct. 18, 2023, 11:37 a.m. UTC
Add comment to tell callback function target_destroy of
scsi_host_template must not sleep.

Signed-off-by: Wenchao Hao <haowenchao2@huawei.com>
---
 include/scsi/scsi_host.h | 3 +++
 1 file changed, 3 insertions(+)

Comments

Bart Van Assche Oct. 18, 2023, 6:03 p.m. UTC | #1
On 10/18/23 04:37, Wenchao Hao wrote:
> Add comment to tell callback function target_destroy of
> scsi_host_template must not sleep.
> 
> Signed-off-by: Wenchao Hao <haowenchao2@huawei.com>
> ---
>   include/scsi/scsi_host.h | 3 +++
>   1 file changed, 3 insertions(+)
> 
> diff --git a/include/scsi/scsi_host.h b/include/scsi/scsi_host.h
> index 49f768d0ff37..2c61dd30d766 100644
> --- a/include/scsi/scsi_host.h
> +++ b/include/scsi/scsi_host.h
> @@ -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 *);

Reviewed-by: Bart Van Assche <bvanassche@acm.org>
diff mbox series

Patch

diff --git a/include/scsi/scsi_host.h b/include/scsi/scsi_host.h
index 49f768d0ff37..2c61dd30d766 100644
--- a/include/scsi/scsi_host.h
+++ b/include/scsi/scsi_host.h
@@ -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 *);