Skip to content

Commit

Permalink
fat: drop negative dentry on rename() path
Browse files Browse the repository at this point in the history
Drop the negative dentry on rename() path, in order to make sure to
use the case sensitive name which is specified by user if this is for
creation.

For it, this uses newly added LOOKUP_RENAME_TARGET like LOOKUP_CREATE.

Signed-off-by: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
  • Loading branch information
OGAWA Hirofumi committed Nov 11, 2008
1 parent f21f237 commit ebeb040
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion fs/fat/namei_vfat.c
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ static int vfat_revalidate_ci(struct dentry *dentry, struct nameidata *nd)
* for creation.
*/
if (!(nd->flags & (LOOKUP_CONTINUE | LOOKUP_PARENT))) {
if (nd->flags & LOOKUP_CREATE)
if (nd->flags & (LOOKUP_CREATE | LOOKUP_RENAME_TARGET))
return 0;
}

Expand Down

0 comments on commit ebeb040

Please sign in to comment.