Received: by 2002:ac0:bc90:0:0:0:0:0 with SMTP id a16csp4964178img; Tue, 26 Mar 2019 22:21:42 -0700 (PDT) X-Google-Smtp-Source: APXvYqzlVUKb2+AlDVi+Me7gNjEEolBcqzehrIXX/pcHsUmWoYewGthnZu2rjCGVhGDfb4Ik55G8 X-Received: by 2002:a63:6fcf:: with SMTP id k198mr20226147pgc.158.1553664102815; Tue, 26 Mar 2019 22:21:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1553664102; cv=none; d=google.com; s=arc-20160816; b=AJTB0tXg/Fh1kL0UMGeTUN9fKGdsp6LQwbA+ypCVc3xdjkvJrjHaqCK9TuayBuq2ka DrUO7CepJ9/euwvaXWrWrxcIs1C/8rBDkKYl+dCM67CgqrlnNpUYzjCgmJ1JpfD930LN 8Zb/bRPXgHSzf5zvjqUCzxybe2QRvEgdX2pkIPIhMjKsgqIEAYYFAIFlJjLIxmslmBfU S/3Em9PtQfv1JFijsmaQK+8SGlXHFWh6phPzuSz22csT+qanAkV8xwlqwa0siyHs5HU+ J3p8ju1MOiK2uEzub+PGu3JrNH2PszB9BNnVhFUFgRLsTHrm3eCrDnMdgxVMrAkFN9Th uX3g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=/V9EiCbEBqtmhZjnGp57UVdGbBwjsSOkOxWMeC1aoik=; b=N23y4owh8AXr2vQbBC8qalMk4REuA5DLcrARxOZnXAiDQqoY0awKk3Xbkw5phwkPGc m5nUjC96tlUncaZKspxMoAmZKIMrme+vjrlcNFlyOHaKl2iBPY0aOLtGBmvDHC//Nwav yDaDXwqHsIQ1ilFOoG7bf0Cjl3aG3PNTrjhvTZeapqJl4pVzf08Kha2eXdQI7jJrJLVC 8spk42xv/1IoYPc1CUWyArEOKeohSpkK9OhdajESNtLQOz+5C3+ueWiIWidNQ4nAk+qv X3aE75U8l95rXr5vzZJqGAOyYBX16lWMZWAH6DWHFDK8z1IL7/9oGa8iS2qrwKmp9Tt7 VbzQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@messagingengine.com header.s=fm2 header.b=D1hYvx32; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id j9si17277215pgp.17.2019.03.26.22.21.27; Tue, 26 Mar 2019 22:21:42 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@messagingengine.com header.s=fm2 header.b=D1hYvx32; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1733086AbfC0FTL (ORCPT + 99 others); Wed, 27 Mar 2019 01:19:11 -0400 Received: from out3-smtp.messagingengine.com ([66.111.4.27]:56459 "EHLO out3-smtp.messagingengine.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725768AbfC0FTJ (ORCPT ); Wed, 27 Mar 2019 01:19:09 -0400 Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailout.nyi.internal (Postfix) with ESMTP id 2C23121F16; Wed, 27 Mar 2019 01:19:09 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute3.internal (MEProxy); Wed, 27 Mar 2019 01:19:09 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:date:from :in-reply-to:message-id:mime-version:references:subject:to :x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm2; bh=/V9EiCbEBqtmhZjnGp57UVdGbBwjsSOkOxWMeC1aoik=; b=D1hYvx32 iRuhtHJCBJqKnUcpWAqXpD6HKA1CSf3HFuWlv8C6PHu1j2ysnAFn5en9sQUWhrV8 byWKpXo4Iuj4zTFMOAjCK4gFv6ZmChVdaHCXew9ueIPl+f7ufloiVPAL/Bc3kWRT KbWbGvGmT4g5hZKjUpDfGi04EX7UDDpoe2M8z7TX7OBCa8xZfmDGBvYVoJkYVnXx QdWuc1Ub1qXn6/yqWeY5XU1Im5NdxDnaKBcvjvh/1vASm2xN9IZGDRVKhxORdkVT E1ONvboiTJm4fdpPhY2qo4ijfBk0fhNXGiZ+2nkNa/MEaplo4OjbZWusHNRNLPMD 9WGugFLCHnZo8A== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedutddrkedugdektdcutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefhvffufffkofgjfhgggfestdekredtredttdenucfhrhhomhepfdfvohgsihhn ucevrdcujfgrrhguihhnghdfuceothhosghinheskhgvrhhnvghlrdhorhhgqeenucfkph epuddvgedrudeiledrudefledrudelvdenucfrrghrrghmpehmrghilhhfrhhomhepthho sghinheskhgvrhhnvghlrdhorhhgnecuvehluhhsthgvrhfuihiivgeple X-ME-Proxy: Received: from eros.localdomain (124-169-139-192.dyn.iinet.net.au [124.169.139.192]) by mail.messagingengine.com (Postfix) with ESMTPA id A8491E415C; Wed, 27 Mar 2019 01:19:05 -0400 (EDT) From: "Tobin C. Harding" To: Al Viro Cc: "Tobin C. Harding" , Jonathan Corbet , Mauro Carvalho Chehab , Neil Brown , Randy Dunlap , linux-doc@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v3 11/24] dcache: Fix docstring comment for d_drop() Date: Wed, 27 Mar 2019 16:17:04 +1100 Message-Id: <20190327051717.23225-12-tobin@kernel.org> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190327051717.23225-1-tobin@kernel.org> References: <20190327051717.23225-1-tobin@kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Currently the function docstring comment for d_drop() is combined for d_drop() and __d_drop(). Also the comment includes information on internal function ___d_drop(), this information does not need to be exposed via the kernel docs. Put internal documentation in a non-docstring comment above the relevant function (___d_drop()). Add docstring comments to both d_drop() and __d_drop() (both are external functions). Make d_drop() comment very simple, pointing to __d_drop() comment. Signed-off-by: Tobin C. Harding --- fs/dcache.c | 41 +++++++++++++++++++++++++++-------------- 1 file changed, 27 insertions(+), 14 deletions(-) diff --git a/fs/dcache.c b/fs/dcache.c index 141ffe27e95a..8094ae9c2d1b 100644 --- a/fs/dcache.c +++ b/fs/dcache.c @@ -429,21 +429,11 @@ static void d_lru_shrink_move(struct list_lru_one *lru, struct dentry *dentry, list_lru_isolate_move(lru, &dentry->d_lru, list); } -/** - * d_drop - drop a dentry - * @dentry: dentry to drop - * - * d_drop() unhashes the entry from the parent dentry hashes, so that it won't - * be found through a VFS lookup any more. Note that this is different from - * deleting the dentry - d_delete will try to mark the dentry negative if - * possible, giving a successful _negative_ lookup, while d_drop will - * just make the cache lookup fail. - * - * d_drop() is used mainly for stuff that wants to invalidate a dentry for some - * reason (NFS timeouts or autofs deletes). +/* + * ___d_drop() - Drop a dentry. + * @dentry: The dentry to drop. * - * __d_drop requires dentry->d_lock - * ___d_drop doesn't mark dentry as "unhashed" + * Does not mark dentry as "unhashed" * (dentry->d_hash.pprev will be LIST_POISON2, not NULL). */ static void ___d_drop(struct dentry *dentry) @@ -464,6 +454,21 @@ static void ___d_drop(struct dentry *dentry) hlist_bl_unlock(b); } +/** + * __d_drop() - Drop a dentry. + * @dentry: The dentry to drop. + * + * Unhashes the entry from the parent dentry hashes, so that it won't + * be found through a VFS lookup any more. Note that this is different + * from deleting the dentry - d_delete() will try to mark the dentry + * negative if possible, giving a successful _negative_ lookup, while + * __d_drop() will just make the cache lookup fail. + * + * __d_drop() is used mainly for stuff that wants to invalidate a dentry + * for some reason (NFS timeouts or autofs deletes). + * + * Context: Caller must hold the dentry->d_lock. + */ void __d_drop(struct dentry *dentry) { if (!d_unhashed(dentry)) { @@ -474,6 +479,14 @@ void __d_drop(struct dentry *dentry) } EXPORT_SYMBOL(__d_drop); +/** + * d_drop() - Drop a dentry. + * @dentry: The dentry to drop. + * + * Wrapper around __d_drop() that handles the locking. + * + * Context: Takes/drops the dentry->d_lock. + */ void d_drop(struct dentry *dentry) { spin_lock(&dentry->d_lock); -- 2.21.0