From patchwork Thu Nov 9 06:20:40 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Al Viro X-Patchwork-Id: 13450648 Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net [23.128.96.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 53430D308 for ; Thu, 9 Nov 2023 06:20:59 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linux.org.uk header.i=@linux.org.uk header.b="fmdzLxwX" 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 74365A4 for ; Wed, 8 Nov 2023 22:20:58 -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=K8pn4j7PhfDk0ZZ9suKzepKbvr/qzVgdalV7y/0pxco=; b=fmdzLxwXuGIsPkMMXcJ8qc7YxC BVVH9HoyGE9vkvy5tk8fs3X8JnU1NwpVKrn0JMRhrumevsbNIeF/2wI4JmqLErjglz1PtsiUnqLuN peIx+MuyVLHhXViJxArMqZ6S/vz9yqDvg2MTOiMKonu6aYHIfHgbeYtBPY0BgbmdaTe0Yq40SmZqn 3jtoRVP18QhRXIeHizoGMkh43ECm0ZiihyV53Muu+G4d4LFSMsaqWoLOHRKbmo4uHE1HCzvRVGoZn 0FU/4c8JtOGJwpYgZ1t5eeuqAC3DWJl9qCh6MiYKpe1lRNhCAoZu4lCtMqBHAQncZSfL3A/BZgtjK WIoDpqSg==; Received: from viro by zeniv.linux.org.uk with local (Exim 4.96 #2 (Red Hat Linux)) id 1r0yPR-00DLjP-0P; Thu, 09 Nov 2023 06:20:57 +0000 From: Al Viro To: Linus Torvalds Cc: linux-fsdevel@vger.kernel.org, Christian Brauner Subject: [PATCH 06/22] get rid of __dget() Date: Thu, 9 Nov 2023 06:20:40 +0000 Message-Id: <20231109062056.3181775-6-viro@zeniv.linux.org.uk> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20231109062056.3181775-1-viro@zeniv.linux.org.uk> References: <20231109061932.GA3181489@ZenIV> <20231109062056.3181775-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 Signed-off-by: Al Viro Reviewed-by: Christian Brauner --- fs/dcache.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/fs/dcache.c b/fs/dcache.c index 56af55f2b7d9..1476f2d6e9ea 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; }