LOOKUP_CREATE and LOOKUP_RENAME_TARGET can be set only on the last step
[firefly-linux-kernel-4.4.55.git] / fs / jfs / namei.c
index eaaf2b511e89a64613bd281f82029ee869358484..7a2e8e5152fd0822927d5a711de78e1c57c5bbbd 100644 (file)
@@ -1624,10 +1624,8 @@ static int jfs_ci_revalidate(struct dentry *dentry, struct nameidata *nd)
         * case sensitive name which is specified by user if this is
         * for creation.
         */
-       if (!(nd->flags & (LOOKUP_CONTINUE | LOOKUP_PARENT))) {
-               if (nd->flags & (LOOKUP_CREATE | LOOKUP_RENAME_TARGET))
-                       return 0;
-       }
+       if (nd->flags & (LOOKUP_CREATE | LOOKUP_RENAME_TARGET))
+               return 0;
        return 1;
 }