Whamcloud - gitweb
LU-8371 llite: Trust creates in revalidate too.
[fs/lustre-release.git] / lustre / llite / dcache.c
index 22861ca..c42e89d 100644 (file)
@@ -328,12 +328,12 @@ static int ll_revalidate_dentry(struct dentry *dentry,
                return 1;
 
        /*
                return 1;
 
        /*
-        * if open&create is set, talk to MDS to make sure file is created if
-        * necessary, because we can't do this in ->open() later since that's
-        * called on an inode. return 0 here to let lookup to handle this.
+        * VFS warns us that this is the second go around and previous
+        * operation failed (most likely open|creat), so this time
+        * we better talk to the server via the lookup path by name,
+        * not by fid.
         */
         */
-       if ((lookup_flags & (LOOKUP_OPEN | LOOKUP_CREATE)) ==
-           (LOOKUP_OPEN | LOOKUP_CREATE))
+       if (lookup_flags & LOOKUP_REVAL)
                return 0;
 
        if (!dentry_may_statahead(dir, dentry))
                return 0;
 
        if (!dentry_may_statahead(dir, dentry))