summaryrefslogtreecommitdiffstats
path: root/fs/vfat/namei.c
diff options
context:
space:
mode:
authorRalf Baechle <ralf@linux-mips.org>1998-08-25 09:12:35 +0000
committerRalf Baechle <ralf@linux-mips.org>1998-08-25 09:12:35 +0000
commitc7fc24dc4420057f103afe8fc64524ebc25c5d37 (patch)
tree3682407a599b8f9f03fc096298134cafba1c9b2f /fs/vfat/namei.c
parent1d793fade8b063fde3cf275bf1a5c2d381292cd9 (diff)
o Merge with Linux 2.1.116.
o New Newport console code. o New G364 console code.
Diffstat (limited to 'fs/vfat/namei.c')
-rw-r--r--fs/vfat/namei.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/fs/vfat/namei.c b/fs/vfat/namei.c
index bdd37df13..be37113d5 100644
--- a/fs/vfat/namei.c
+++ b/fs/vfat/namei.c
@@ -1105,6 +1105,9 @@ static int vfat_find(struct inode *dir,struct qstr* qname,
fil.f_pos = 0;
vf.name = qname->name;
vf.len = qname->len;
+ while (vf.len && vf.name[vf.len-1] == '.') {
+ vf.len--;
+ }
vf.new_filename = new_filename;
vf.found = 0;
vf.posix = MSDOS_SB(sb)->options.posixfs;
@@ -1135,7 +1138,7 @@ static int vfat_find(struct inode *dir,struct qstr* qname,
goto cleanup;
}
- res = vfat_build_slots(dir, qname->name, qname->len, ds,
+ res = vfat_build_slots(dir, qname->name, vf.len, ds,
&slots, &is_long);
if (res < 0) goto cleanup;
@@ -1768,6 +1771,8 @@ int vfat_rename(struct inode *old_dir,struct dentry *old_dentry,
MSDOS_I(new_inode)->i_logstart = MSDOS_I(old_inode)->i_logstart;
MSDOS_I(new_inode)->i_attrs = MSDOS_I(old_inode)->i_attrs;
+ old_inode->i_nlink = 0;
+
fat_cache_inval_inode(old_inode);
mark_inode_dirty(new_inode);