X-Git-Url: https://git.kernel.dk/?a=blobdiff_plain;f=fs%2Fnamei.c;h=33e9495a31293e2c080b5b0bd2e50523a460ceee;hb=8cd1e73111f95ca915f37ed534bbfbdf24fc1ca8;hp=726d211db4842715f71e1911f6940c93b19fe57f;hpb=d8cc3972b2178f9fe532306330f76bf51cb0d8bd;p=linux-2.6-block.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)))