patch-2.3.51 linux/fs/msdos/namei.c
Next file: linux/fs/namei.c
Previous file: linux/fs/msdos/msdosfs_syms.c
Back to the patch index
Back to the overall index
- Lines: 48
- Date:
Fri Mar 10 10:48:48 2000
- Orig file:
v2.3.50/linux/fs/msdos/namei.c
- Orig date:
Tue Mar 7 14:32:26 2000
diff -u --recursive --new-file v2.3.50/linux/fs/msdos/namei.c linux/fs/msdos/namei.c
@@ -326,7 +326,7 @@
* whether it is empty.
*/
res = -EBUSY;
- if (!list_empty(&dentry->d_hash))
+ if (!d_unhashed(dentry))
goto rmdir_done;
res = fat_dir_empty(inode);
if (res)
@@ -463,6 +463,9 @@
goto degenerate_case;
if (is_dir) {
if (new_inode) {
+ error = -EBUSY;
+ if (!d_unhashed(new_dentry))
+ goto out;
error = fat_dir_empty(new_inode);
if (error)
goto out;
@@ -590,28 +593,18 @@
setattr: fat_notify_change,
};
-static void msdos_put_super_callback(struct super_block *sb)
-{
- MOD_DEC_USE_COUNT;
-}
-
struct super_block *msdos_read_super(struct super_block *sb,void *data, int silent)
{
struct super_block *res;
- MOD_INC_USE_COUNT;
-
MSDOS_SB(sb)->options.isvfat = 0;
res = fat_read_super(sb, data, silent, &msdos_dir_inode_operations);
if (res == NULL)
goto out_fail;
- MSDOS_SB(sb)->put_super_callback=msdos_put_super_callback;
sb->s_root->d_op = &msdos_dentry_operations;
return res;
out_fail:
- sb->s_dev = 0;
- MOD_DEC_USE_COUNT;
return NULL;
}
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)