Received: by 2002:a05:7412:d8a:b0:e2:908c:2ebd with SMTP id b10csp3412427rdg; Tue, 17 Oct 2023 14:04:36 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGpB7b8WREFLQG/9EPykQ1jF9gHlvuF4VIHSsC+N+YZhGv3xqWQfOOm2D9Z+oQ/GjWjPvnC X-Received: by 2002:a05:6a21:778b:b0:16b:d853:90be with SMTP id bd11-20020a056a21778b00b0016bd85390bemr2911373pzc.25.1697576676470; Tue, 17 Oct 2023 14:04:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697576676; cv=none; d=google.com; s=arc-20160816; b=zSeGxLNGL+zW4GObB2uitScTzkhfUFVKJGsqBs9JQuZcR2Ey4I3X/MH8FD+ecyLe4b VFrHttrLQnD8NrgHmplPJCmtW9glnO/sgE3A6XtuSPYrLVbIH+afwoOTTU5mKx5dcxTA ys4LzRThpMhn2hsBUNN568TPB8SmiB/SRpmb7+19NXAjenjYw6S0M5YgehQt60YKmQz0 3J7Y6D9XhJzpxlKhIvsgj1fIgpVSIcGpVRZM1795xJgVOuYSVf+mBDFX4O+cE9jW0SV2 tJN/J2tu3UUz6Y/gf2JdImdXqXuUJNt0t/BVUGJQMZ94VnU5I38gXVpda53hNNhyCf2q 7jtw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id; bh=b8cJNPTURV0GkUj1cmdUTjReWRSunzyFjmyMjB4isUU=; fh=JvkXUnDQB0iKsaI3cqy3eFUfWBCGaGvMfIz114EHkKo=; b=LiKY2nz6mhlH050HiQ2FwmCB0SA4iv9T2Tolf+WAFyXKmIZpOaAcfPx+H8NYrDwXtc Qt8g5RZoeZUIQd7M4eoBFOo4s1VVPVM2zEk43lB7SYURuFT9FeYN9mep2ANxUKWDncLU 1V+FJ34BiMeR4aReidyMZCCfZYmF5Wq2/nacCskFgDpTDfUmdQw/CYRfeJZjTQoZlEto 2rgRD7UNk0y8WNDNTfh+jYhN3RqEwCnhOd5xx/0EVAZ8TgFhIXIIyAI0bPnLh7bed2xk oopqEkEDbW+DjPAy/9sGHdUfjrrRJG6tjTCLV8xoVaJWOu5/+b1ysGBHL08UIbK5njDy DDFA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.36 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=acm.org Return-Path: Received: from pete.vger.email (pete.vger.email. [23.128.96.36]) by mx.google.com with ESMTPS id y185-20020a638ac2000000b005ab05858e70si612943pgd.782.2023.10.17.14.04.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 17 Oct 2023 14:04:36 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.36 as permitted sender) client-ip=23.128.96.36; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.36 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=acm.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by pete.vger.email (Postfix) with ESMTP id 4FC5D8047554; Tue, 17 Oct 2023 14:04:34 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at pete.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233170AbjJQVEY (ORCPT + 99 others); Tue, 17 Oct 2023 17:04:24 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56608 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231149AbjJQVEW (ORCPT ); Tue, 17 Oct 2023 17:04:22 -0400 Received: from mail-oo1-f50.google.com (mail-oo1-f50.google.com [209.85.161.50]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1075DF0; Tue, 17 Oct 2023 14:04:17 -0700 (PDT) Received: by mail-oo1-f50.google.com with SMTP id 006d021491bc7-57b811a6ce8so3423408eaf.3; Tue, 17 Oct 2023 14:04:17 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697576656; x=1698181456; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=b8cJNPTURV0GkUj1cmdUTjReWRSunzyFjmyMjB4isUU=; b=mXqWlEl2e3IGJ3A1jtPu0XjRm6PFWDHQ7OY17GUDSleoL4tTGbecy+eItCiwXjSj0v 8H9QYwfml905PnQE2ZngqBPDSBU6bpHRaCeJkzlJJSpbh8esWcQ+XlOhxHJ/o/Lk3z52 AIagrwoRj0aMxhwHvyWAEtbD+2G+YSDEYNnqkVi1tDOiKE/eCbEdF0TrHZi0krxtOEBn tD1EHbkbspM358CVJ/KTI3kcIDz/UifIZhvTIUHc4IkOCKhrvdLEgVnJ89Txja0APn69 RbThIQvXd0DGGyd95NnLjJgt5TA2OcrbSexxTXk23CrRStBvwBjuPVTakclqsd4uv7aO v/Fg== X-Gm-Message-State: AOJu0YxWhfcZIGThr2b8TwVkiXcy0wGyb7whKqwu92flnPEqSFMG4s7P U8oTwGgsUIbk3iHFZiplOkM= X-Received: by 2002:a05:6358:fac9:b0:140:fbfe:d941 with SMTP id ts9-20020a056358fac900b00140fbfed941mr3122490rwb.20.1697576656165; Tue, 17 Oct 2023 14:04:16 -0700 (PDT) Received: from ?IPV6:2620:15c:211:201:8f02:2919:9600:ac09? ([2620:15c:211:201:8f02:2919:9600:ac09]) by smtp.gmail.com with ESMTPSA id h26-20020aa796da000000b006bae6eea9d0sm1906785pfq.49.2023.10.17.14.04.15 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 17 Oct 2023 14:04:15 -0700 (PDT) Message-ID: <128adc0e-3a91-4395-b373-ef77a0882f29@acm.org> Date: Tue, 17 Oct 2023 14:04:13 -0700 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v2 2/2] scsi: Add comment of target_destroy in scsi_host_template Content-Language: en-US To: Wenchao Hao , "James E . J . Bottomley" , "Martin K . Petersen" , linux-scsi@vger.kernel.org Cc: linux-kernel@vger.kernel.org, louhongxiang@huawei.com References: <20231016020847.1270258-1-haowenchao2@huawei.com> <20231016020847.1270258-3-haowenchao2@huawei.com> From: Bart Van Assche In-Reply-To: <20231016020847.1270258-3-haowenchao2@huawei.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit 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 pete.vger.email 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 (pete.vger.email [0.0.0.0]); Tue, 17 Oct 2023 14:04:34 -0700 (PDT) On 10/15/23 19:08, 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 > --- > 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..2e8d77441064 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 shost->host_lock held, > + * so donot call functions might cause schedule > + * > * Status: OPTIONAL > */ > void (* target_destroy)(struct scsi_target *); The above comment can be made shorter and spelling and grammar can be improved. How about the following: "This callback is called with the host lock held and hence must not sleep."? Thanks, Bart.