提交 45adfef7 编写于 作者: S Sage Weil 提交者: Al Viro

hpfs: remove unnecessary dentry_unhash on rmdir, dir rename

Hpfs has no problems with references to unlinked directories.

We leave one dentry_unhash call in place, in hpfs_unlink's strange path
where it tries to truncate a file because the disk is full.  I'm not sure
what the full story is there.

CC: Mikulas Patocka <mikulas@artax.karlin.mff.cuni.cz>
Signed-off-by: NSage Weil <sage@newdream.net>
Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
上级 b80d2c22
...@@ -439,8 +439,6 @@ static int hpfs_rmdir(struct inode *dir, struct dentry *dentry) ...@@ -439,8 +439,6 @@ static int hpfs_rmdir(struct inode *dir, struct dentry *dentry)
int err; int err;
int r; int r;
dentry_unhash(dentry);
hpfs_adjust_length(name, &len); hpfs_adjust_length(name, &len);
hpfs_lock(dir->i_sb); hpfs_lock(dir->i_sb);
err = -ENOENT; err = -ENOENT;
...@@ -535,9 +533,6 @@ static int hpfs_rename(struct inode *old_dir, struct dentry *old_dentry, ...@@ -535,9 +533,6 @@ static int hpfs_rename(struct inode *old_dir, struct dentry *old_dentry,
struct fnode *fnode; struct fnode *fnode;
int err; int err;
if (new_inode && S_ISDIR(new_inode->i_mode))
dentry_unhash(new_dentry);
if ((err = hpfs_chk_name(new_name, &new_len))) return err; if ((err = hpfs_chk_name(new_name, &new_len))) return err;
err = 0; err = 0;
hpfs_adjust_length(old_name, &old_len); hpfs_adjust_length(old_name, &old_len);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册