Skip to content

Commit

Permalink
LOOKUP_CREATE and LOOKUP_RENAME_TARGET can be set only on the last step
Browse files Browse the repository at this point in the history
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
  • Loading branch information
Al Viro committed Jul 20, 2011
1 parent dd7dd55 commit 407938e
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 12 deletions.
6 changes: 2 additions & 4 deletions fs/cifs/dir.c
Original file line number Diff line number Diff line change
Expand Up @@ -663,10 +663,8 @@ cifs_d_revalidate(struct dentry *direntry, 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;

if (time_after(jiffies, direntry->d_time + HZ) || !lookupCacheEnabled)
return 0;
Expand Down
6 changes: 2 additions & 4 deletions fs/fat/namei_vfat.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
* 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 vfat_revalidate_shortname(dentry);
}
Expand Down
6 changes: 2 additions & 4 deletions fs/jfs/namei.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit 407938e

Please sign in to comment.