lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250213122137.11830-1-alexjlzheng@tencent.com>
Date: Thu, 13 Feb 2025 20:21:37 +0800
From: Jinliang Zheng <alexjlzheng@...il.com>
To: viro@...iv.linux.org.uk,
	brauner@...nel.org,
	jack@...e.cz
Cc: alexjlzheng@...cent.com,
	linux-fsdevel@...r.kernel.org,
	linux-kernel@...r.kernel.org
Subject: [PATCH] fs: remove useless d_unhashed() retry in d_alloc_parallel()

After commit 45f78b0a2743 ("fs/dcache: Move the wakeup from
__d_lookup_done() to the caller."), we will only wake up
d_wait_lookup() after adding dentry to dentry_hashtable.

Therefore, there is no need to keep retries about d_unhashed()
in d_alloc_parallel().

Signed-off-by: Jinliang Zheng <alexjlzheng@...cent.com>
---
 fs/dcache.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/fs/dcache.c b/fs/dcache.c
index e3634916ffb9..543833eedd8c 100644
--- a/fs/dcache.c
+++ b/fs/dcache.c
@@ -2584,8 +2584,6 @@ struct dentry *d_alloc_parallel(struct dentry *parent,
 			goto mismatch;
 		if (unlikely(dentry->d_parent != parent))
 			goto mismatch;
-		if (unlikely(d_unhashed(dentry)))
-			goto mismatch;
 		if (unlikely(!d_same_name(dentry, parent, name)))
 			goto mismatch;
 		/* OK, it *is* a hashed match; return it */
-- 
2.48.1


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ