From patchwork Fri Nov 24 06:06:28 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Al Viro X-Patchwork-Id: 13467012 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linux.org.uk header.i=@linux.org.uk header.b="sD1p9PD3" Received: from zeniv.linux.org.uk (zeniv.linux.org.uk [IPv6:2a03:a000:7:0:5054:ff:fe1c:15ff]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9D84D1BC1; Thu, 23 Nov 2023 22:06:46 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=linux.org.uk; s=zeniv-20220401; h=Sender:Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From: Reply-To:Content-Type:Content-ID:Content-Description; bh=F0l0LXuyYl3aQh13MYbOCPyTzEacmOUDtDuVZ649mGc=; b=sD1p9PD3jyjTCPHJWtPqnZMA0T HR9Bpn1XwnzdXDuf+Xux0SSutmhXjL89W81Q6BnH/bKLnZNmdJBlkSCWMz5q6C8LlMALjI/YRfuTn CzFod6rHTGuR/yvtjiswaZlnqzeoQC+tol32ywHs+eRThG0UzTetm6ekwJndC1krNdmNtTBS7i9No OK7dp98CvRYvGPbQ7z2MEqnlhDxYGzHpjtZ1PbkewNdwAG0KNoGDag/XVvMJ6KjVa63Xqiasr93jZ qvKZlsDYOHh7/5vzziUwSnZIB9vKg7877E4jBw+r7efOkzFpbYUMo2QLXKDlyMCv+JJCq2Lv1mUVj 2mm+607A==; Received: from viro by zeniv.linux.org.uk with local (Exim 4.96 #2 (Red Hat Linux)) id 1r6PKv-002Q0U-0N; Fri, 24 Nov 2023 06:06:45 +0000 From: Al Viro To: linux-fsdevel@vger.kernel.org Cc: Linus Torvalds , Christian Brauner , linux-kernel@vger.kernel.org Subject: [PATCH 04/20] get rid of __dget() Date: Fri, 24 Nov 2023 06:06:28 +0000 Message-Id: <20231124060644.576611-4-viro@zeniv.linux.org.uk> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20231124060644.576611-1-viro@zeniv.linux.org.uk> References: <20231124060553.GA575483@ZenIV> <20231124060644.576611-1-viro@zeniv.linux.org.uk> Precedence: bulk X-Mailing-List: linux-fsdevel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Sender: Al Viro fold into the sole remaining caller Reviewed-by: Christian Brauner Signed-off-by: Al Viro --- fs/dcache.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/fs/dcache.c b/fs/dcache.c index c82ae731df9a..b8f1b54a1492 100644 --- a/fs/dcache.c +++ b/fs/dcache.c @@ -948,11 +948,6 @@ static inline void __dget_dlock(struct dentry *dentry) dentry->d_lockref.count++; } -static inline void __dget(struct dentry *dentry) -{ - lockref_get(&dentry->d_lockref); -} - struct dentry *dget_parent(struct dentry *dentry) { int gotref; @@ -1002,7 +997,7 @@ static struct dentry * __d_find_any_alias(struct inode *inode) if (hlist_empty(&inode->i_dentry)) return NULL; alias = hlist_entry(inode->i_dentry.first, struct dentry, d_u.d_alias); - __dget(alias); + lockref_get(&alias->d_lockref); return alias; }