Message ID | 20230922093842.2646157-3-haowenchao2@huawei.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:612c:172:b0:3f2:4152:657d with SMTP id h50csp5441282vqi; Fri, 22 Sep 2023 02:51:24 -0700 (PDT) X-Google-Smtp-Source: AGHT+IELheFVRkoyhw6QhAQpAGV3RSIw7a9HPKAmR/KIpCpx1GCTFhrq3ZTmodOXlzdrzeU5oWyF X-Received: by 2002:a9d:4d1a:0:b0:6bc:f276:717f with SMTP id n26-20020a9d4d1a000000b006bcf276717fmr8873996otf.13.1695376284578; Fri, 22 Sep 2023 02:51:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695376284; cv=none; d=google.com; s=arc-20160816; b=TUJ4dIFEfZVeTcU3zFGmSb7F6trzbuLWBxObcDy9WgBJxfAUOOR02jhxpR7HRmGfB6 Qlwb69j6JY9gE6dIF1ko73+3i3LyrCOl7bpEQGElPD4EsIlDDL2xUuvK7xjgCXhgjtTa hmWwXyifaUyUuHu0J+JNIEAZ6uMOZ16HbeCb9G+tBq9ZC45WGg+hd43zraS/x3l9NNQh aR4MZXI7S8WifB1J0Nga7y5Phr/W5q+rgKTK2K75tK+hATJOSQZudDBZ3KLIE6/gjE4H SrgIbOVPBJUJQeA7MLaI9LVdbWkucriLIumxNHLL+5p7sirIA4+1kXrWmGWypRmYlXe4 AtqQ== 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=rPA8MSMJ8Ho8H+VmpnWrqcLPduKaYRFcpo3eauznfsA=; fh=czI/RuS43lIcejQG7heSpqlilKbUywFjC/3GVjzlias=; b=c/8oNaNUyml2qYRCLdGKihUAZt30Vk8q94sUK0fu9ya0MUFlPYqf/zs3/z4zStkjFL oOxdMQegb66QJwU79bxbOxOwG+h99fSk3e4U7HmP17aCWPMDxPMGtPeqzzuCdAtcWLxJ rFoCLyUOF/o+HS4ew0KdrPczTJJS9UGuTh+nQUIrasei+aFZgiOmJ5Jv6zwCHmKtyeKQ SqcjZ3TyCqFac5cKVGv9ahIDmDnIGUGq4T6/90nD4fIzKiBg2vMhcej6pP4RmINdTQhk /zDT3ZwbTUkgEkxkDLJFQYyX97e+44ONA0WXLCG91LbZg/ZJTgd+sfF+LFP8kWN4y4jj hETw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 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 fry.vger.email (fry.vger.email. [23.128.96.38]) by mx.google.com with ESMTPS id w66-20020a636245000000b00577f7c8db80si3368662pgb.372.2023.09.22.02.51.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 22 Sep 2023 02:51:24 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 as permitted sender) client-ip=23.128.96.38; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 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 fry.vger.email (Postfix) with ESMTP id 7D898838CF8B; Fri, 22 Sep 2023 02:39:23 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at fry.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233283AbjIVJjW (ORCPT <rfc822;chrisfriedt@gmail.com> + 30 others); Fri, 22 Sep 2023 05:39:22 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39632 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233236AbjIVJjO (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Fri, 22 Sep 2023 05:39:14 -0400 Received: from szxga03-in.huawei.com (szxga03-in.huawei.com [45.249.212.189]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5A91D1A8; Fri, 22 Sep 2023 02:39:08 -0700 (PDT) Received: from kwepemm000012.china.huawei.com (unknown [172.30.72.56]) by szxga03-in.huawei.com (SkyGuard) with ESMTP id 4RsRvj2s01zMlmt; Fri, 22 Sep 2023 17:35:29 +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; Fri, 22 Sep 2023 17:39:06 +0800 From: Wenchao Hao <haowenchao2@huawei.com> To: "James E . J . Bottomley" <jejb@linux.ibm.com>, "Martin K . Petersen" <martin.petersen@oracle.com>, <open-iscsi@googlegroups.com>, <linux-scsi@vger.kernel.org> CC: <linux-kernel@vger.kernel.org>, <louhongxiang@huawei.com>, Wenchao Hao <haowenchao2@huawei.com> Subject: [PATCH 2/2] scsi: Add comment of target_destroy in scsi_host_template Date: Fri, 22 Sep 2023 17:38:42 +0800 Message-ID: <20230922093842.2646157-3-haowenchao2@huawei.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20230922093842.2646157-1-haowenchao2@huawei.com> References: <20230922093842.2646157-1-haowenchao2@huawei.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7BIT Content-Type: text/plain; charset=US-ASCII X-Originating-IP: [10.175.101.6] X-ClientProxiedBy: dggems706-chm.china.huawei.com (10.3.19.183) To kwepemm000012.china.huawei.com (7.193.23.142) X-CFilter-Loop: Reflected X-Spam-Status: No, score=-0.8 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on fry.vger.email Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (fry.vger.email [0.0.0.0]); Fri, 22 Sep 2023 02:39:23 -0700 (PDT) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1777730882727667286 X-GMAIL-MSGID: 1777730882727667286 |
Series |
cleanup patch
|
|
Commit Message
Wenchao Hao
Sept. 22, 2023, 9:38 a.m. UTC
Add comment to tell callback function target_destroy of
scsi_host_template is called in atomic context.
Signed-off-by: Wenchao Hao <haowenchao2@huawei.com>
---
include/scsi/scsi_host.h | 3 +++
1 file changed, 3 insertions(+)
Comments
On 9/22/23 02:38, Wenchao Hao wrote: > Add comment to tell callback function target_destroy of > scsi_host_template is called in atomic context. > > 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..a72248fa5adf 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 in called with spin_lock held, so donot > + * call functions might cause schedule > + * This comment should mention which spinlock is held. Thanks, Bart.
On 2023/9/22 22:53, Bart Van Assche wrote: > On 9/22/23 02:38, Wenchao Hao wrote: >> Add comment to tell callback function target_destroy of >> scsi_host_template is called in atomic context. >> >> 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..a72248fa5adf 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 in called with spin_lock held, so donot >> + * call functions might cause schedule >> + * > > This comment should mention which spinlock is held. > Would update, thanks for your review suggestion. > Thanks, > > Bart. > >
diff --git a/include/scsi/scsi_host.h b/include/scsi/scsi_host.h index 49f768d0ff37..a72248fa5adf 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 in called with spin_lock held, so donot + * call functions might cause schedule + * * Status: OPTIONAL */ void (* target_destroy)(struct scsi_target *);