Re: [PATCH] fs: remove useless d_unhashed() retry in d_alloc_parallel()
From: Al Viro
Date: Thu Feb 13 2025 - 08:20:26 EST
On Thu, Feb 13, 2025 at 08:21:37PM +0800, Jinliang Zheng wrote:
> 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.
Not true. d_lookup_done() might be called without having
*ever* hashed the sucker.
Just think for a moment - what, for example, should happen
if ->lookup() fails? Would you have d_alloc_parallel()
coming during that ->lookup() (while dentry is in in-lookup
hash) hang forever?
NAK.