Commit 407938e7 authored by Al Viro's avatar Al Viro

LOOKUP_CREATE and LOOKUP_RENAME_TARGET can be set only on the last step

Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
parent dd7dd556
...@@ -663,10 +663,8 @@ cifs_d_revalidate(struct dentry *direntry, struct nameidata *nd) ...@@ -663,10 +663,8 @@ cifs_d_revalidate(struct dentry *direntry, struct nameidata *nd)
* case sensitive name which is specified by user if this is * case sensitive name which is specified by user if this is
* for creation. * for creation.
*/ */
if (!(nd->flags & (LOOKUP_CONTINUE | LOOKUP_PARENT))) {
if (nd->flags & (LOOKUP_CREATE | LOOKUP_RENAME_TARGET)) if (nd->flags & (LOOKUP_CREATE | LOOKUP_RENAME_TARGET))
return 0; return 0;
}
if (time_after(jiffies, direntry->d_time + HZ) || !lookupCacheEnabled) if (time_after(jiffies, direntry->d_time + HZ) || !lookupCacheEnabled)
return 0; return 0;
......
...@@ -82,10 +82,8 @@ static int vfat_revalidate_ci(struct dentry *dentry, struct nameidata *nd) ...@@ -82,10 +82,8 @@ static int vfat_revalidate_ci(struct dentry *dentry, struct nameidata *nd)
* case sensitive name which is specified by user if this is * case sensitive name which is specified by user if this is
* for creation. * for creation.
*/ */
if (!(nd->flags & (LOOKUP_CONTINUE | LOOKUP_PARENT))) {
if (nd->flags & (LOOKUP_CREATE | LOOKUP_RENAME_TARGET)) if (nd->flags & (LOOKUP_CREATE | LOOKUP_RENAME_TARGET))
return 0; return 0;
}
return vfat_revalidate_shortname(dentry); return vfat_revalidate_shortname(dentry);
} }
......
...@@ -1624,10 +1624,8 @@ static int jfs_ci_revalidate(struct dentry *dentry, struct nameidata *nd) ...@@ -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 * case sensitive name which is specified by user if this is
* for creation. * for creation.
*/ */
if (!(nd->flags & (LOOKUP_CONTINUE | LOOKUP_PARENT))) {
if (nd->flags & (LOOKUP_CREATE | LOOKUP_RENAME_TARGET)) if (nd->flags & (LOOKUP_CREATE | LOOKUP_RENAME_TARGET))
return 0; return 0;
}
return 1; return 1;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment