diff options
author | Ralf Baechle <ralf@linux-mips.org> | 2000-03-13 20:55:15 +0000 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2000-03-13 20:55:15 +0000 |
commit | 1471f525455788c20b130690e0f104df451aeb43 (patch) | |
tree | 3778beba56558beb9a9548ea5b467e9c44ea966f /fs/msdos/namei.c | |
parent | e80d2c5456d30ebba5b0eb8a9d33e17d815d4d83 (diff) |
Merge with Linux 2.3.51.
Diffstat (limited to 'fs/msdos/namei.c')
-rw-r--r-- | fs/msdos/namei.c | 15 |
1 files changed, 4 insertions, 11 deletions
diff --git a/fs/msdos/namei.c b/fs/msdos/namei.c index 87a49fb47..7febeaa8b 100644 --- a/fs/msdos/namei.c +++ b/fs/msdos/namei.c @@ -326,7 +326,7 @@ int msdos_rmdir(struct inode *dir, struct dentry *dentry) * 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 @@ static int do_msdos_rename(struct inode *old_dir, char *old_name, 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 @@ struct inode_operations msdos_dir_inode_operations = { 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; } |