From patchwork Wed Oct 18 11:37:46 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wenchao Hao X-Patchwork-Id: 154840 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:612c:2908:b0:403:3b70:6f57 with SMTP id ib8csp4724758vqb; Wed, 18 Oct 2023 04:38:37 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFro+aK0XZNLZP+DZZrcoeV0qd/avRrOoHCZ9v7A1DDZgLoTk28S81U8RuHcF/Y8nNSDMx4 X-Received: by 2002:a17:90b:4a0b:b0:27d:4d4d:3b19 with SMTP id kk11-20020a17090b4a0b00b0027d4d4d3b19mr5322788pjb.0.1697629117630; Wed, 18 Oct 2023 04:38:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697629117; cv=none; d=google.com; s=arc-20160816; b=0xYM9o/SVgDvbsFBfTFgdJLRQgJXY2oy4/xi/gfmxYAZSZXXyFITZlQsi6NKFlTDHp SwBHp37CT6+BKF0pXJ3fgGjxAovcw3f600dnIW3NwPs7eGLNHY6bPTQk+tnUBJjPamM8 1rVB/CNd8Hg8OoOXjOvK/1d4WcA62u1dU2+t3/TWW8Yo7SNjNFaJluIUxooJ/znIDI6B bo/0iqRay/L9ACFa5oR6T6EppVIwEne9lsJRCXlKqtXCD7KWY/pBtmYBTGsaN7Ou0+rH pcVUc9b3oNlWrYV2qYI1YL+upWh7yCvAvWaZ71nqyG2gc1NqPhAMUt4X7scUTLEW9uug o9fw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=1pZDs/s5AomhMzui9dqhDW4eUjvM16hLt14xCE41J/Y=; fh=eCnJ8dvt+KkuS6aWX+B9QrxoJYHNRCqsmb8Kf0CFQHo=; b=Ax8zF2ORLLZHj2pZ2QhPoVWZq7PrUkjlvMpPfTei82aJ1gKRuUizjYgvtSFQcw/ZR9 iWilkksv9VJkgKvWVQZZ0jX1peIPalpyc52vsbDPqvhnVgQSRwSD1w/Qg3M5MD6/m0rQ w1qCdneob9WTKMgDXho0CYFqTdhtXz0YZ/8CGgBEpgy/Qby8BtzmMA/qvTkf/ihCJVM5 NvTLV1Duswr4O9OEWOGRe8by116n/+C8R3VPpE0L04QxSC80Af22S23pXzszVIbtJZb5 FB6RVAZ07L2bWEc1NCwDE/q/DyM1CvPx2hGrJ3pqBNc/qwSGmjm5iRyefQ/xRAgTfrV3 1Drg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Received: from snail.vger.email (snail.vger.email. [23.128.96.37]) by mx.google.com with ESMTPS id l62-20020a639141000000b005b5df8bf695si1943686pge.328.2023.10.18.04.38.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 18 Oct 2023 04:38:37 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) client-ip=23.128.96.37; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id 018E2813A58E; Wed, 18 Oct 2023 04:38:37 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235211AbjJRLid (ORCPT + 24 others); Wed, 18 Oct 2023 07:38:33 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53644 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235197AbjJRLiQ (ORCPT ); Wed, 18 Oct 2023 07:38:16 -0400 Received: from szxga08-in.huawei.com (szxga08-in.huawei.com [45.249.212.255]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 76BA810C1; Wed, 18 Oct 2023 04:38:04 -0700 (PDT) Received: from kwepemm000012.china.huawei.com (unknown [172.30.72.55]) by szxga08-in.huawei.com (SkyGuard) with ESMTP id 4S9TKz2WF6z15NQC; Wed, 18 Oct 2023 19:35:19 +0800 (CST) Received: from build.huawei.com (10.175.101.6) by kwepemm000012.china.huawei.com (7.193.23.142) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.31; Wed, 18 Oct 2023 19:38:01 +0800 From: Wenchao Hao To: "Martin K . Petersen" , Bart Van Assche CC: "James E . J . Bottomley" , , , , Wenchao Hao Subject: [PATCH v3 2/2] scsi: Add comment of target_destroy in scsi_host_template Date: Wed, 18 Oct 2023 19:37:46 +0800 Message-ID: <20231018113746.1940197-3-haowenchao2@huawei.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20231018113746.1940197-1-haowenchao2@huawei.com> References: <20231018113746.1940197-1-haowenchao2@huawei.com> MIME-Version: 1.0 X-Originating-IP: [10.175.101.6] X-ClientProxiedBy: dggems702-chm.china.huawei.com (10.3.19.179) To kwepemm000012.china.huawei.com (7.193.23.142) X-CFilter-Loop: Reflected X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_BLOCKED,RCVD_IN_MSPIKE_H5,RCVD_IN_MSPIKE_WL, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Wed, 18 Oct 2023 04:38:37 -0700 (PDT) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1780093149886614447 X-GMAIL-MSGID: 1780093149886614447 Add comment to tell callback function target_destroy of scsi_host_template must not sleep. Signed-off-by: Wenchao Hao Reviewed-by: Bart Van Assche --- 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 *);