X-Git-Url: https://git.kernelconcepts.de/?a=blobdiff_plain;f=fs%2Fnamei.c;h=33e9495a31293e2c080b5b0bd2e50523a460ceee;hb=8a28d67457b613258aa0578ccece206d166f2b9f;hp=726d211db4842715f71e1911f6940c93b19fe57f;hpb=03e8f644868f147e021e8660346890e731c2e435;p=karo-tx-linux.git diff --git a/fs/namei.c b/fs/namei.c index 726d211db484..33e9495a3129 100644 --- a/fs/namei.c +++ b/fs/namei.c @@ -1558,8 +1558,6 @@ static int lookup_fast(struct nameidata *nd, negative = d_is_negative(dentry); if (read_seqcount_retry(&dentry->d_seq, seq)) return -ECHILD; - if (negative) - return -ENOENT; /* * This sequence count validates that the parent had no @@ -1580,6 +1578,12 @@ static int lookup_fast(struct nameidata *nd, goto unlazy; } } + /* + * Note: do negative dentry check after revalidation in + * case that drops it. + */ + if (negative) + return -ENOENT; path->mnt = mnt; path->dentry = dentry; if (likely(__follow_mount_rcu(nd, path, inode, seqp)))