patch-2.3.51 linux/fs/vfat/namei.c
Next file: linux/fs/vfat/vfatfs_syms.c
Previous file: linux/fs/umsdos/rdir.c
Back to the patch index
Back to the overall index
- Lines: 64
- Date:
Fri Mar 10 10:48:48 2000
- Orig file:
v2.3.50/linux/fs/vfat/namei.c
- Orig date:
Tue Mar 7 14:32:26 2000
diff -u --recursive --new-file v2.3.50/linux/fs/vfat/namei.c linux/fs/vfat/namei.c
@@ -78,11 +78,6 @@
}
};
-static void vfat_put_super_callback(struct super_block *sb)
-{
- MOD_DEC_USE_COUNT;
-}
-
static int vfat_revalidate(struct dentry *dentry, int flags)
{
PRINTK1(("vfat_revalidate: %s\n", dentry->d_name.name));
@@ -978,7 +973,7 @@
tmp = next;
next = tmp->next;
alias = list_entry(tmp, struct dentry, d_alias);
- if (!list_empty(&alias->d_hash))
+ if (!d_unhashed(alias))
return dget(alias);
}
return NULL;
@@ -1085,7 +1080,7 @@
struct buffer_head *bh = NULL;
struct msdos_dir_entry *de;
- if (!list_empty(&dentry->d_hash))
+ if (!d_unhashed(dentry))
return -EBUSY;
res = fat_dir_empty(dentry->d_inode);
@@ -1207,6 +1202,9 @@
}
if (is_dir) {
+ res =-EBUSY;
+ if (!d_unhashed(new_dentry))
+ goto rename_done;
res = fat_dir_empty(new_inode);
if (res)
goto rename_done;
@@ -1274,21 +1272,13 @@
{
struct super_block *res;
- MOD_INC_USE_COUNT;
-
MSDOS_SB(sb)->options.isvfat = 1;
res = fat_read_super(sb, data, silent, &vfat_dir_inode_operations);
- if (res == NULL) {
- sb->s_dev = 0;
- MOD_DEC_USE_COUNT;
+ if (res == NULL)
return NULL;
- }
- if (!parse_options((char *) data, &(MSDOS_SB(sb)->options))) {
- MOD_DEC_USE_COUNT;
- } else {
- MSDOS_SB(sb)->put_super_callback=vfat_put_super_callback;
+ if (parse_options((char *) data, &(MSDOS_SB(sb)->options))) {
MSDOS_SB(sb)->options.dotsOK = 0;
if (MSDOS_SB(sb)->options.posixfs) {
MSDOS_SB(sb)->options.name_check = 's';
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)