]> git.kernelconcepts.de Git - karo-tx-linux.git/blobdiff - fs/namei.c
Merge remote-tracking branch 'nfsd/nfsd-next'
[karo-tx-linux.git] / fs / namei.c
index d68c21fe4598b10c597f7b34dc030afc73bcbc72..5d4645e6537691677ba91a488bfb149c24fa0b08 100644 (file)
@@ -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)))