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

minix: remove unnecessary dentry_unhash on rmdir, dir rename

Minix has no issues with references to unlinked directories.
Signed-off-by: NSage Weil <sage@newdream.net>
Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
上级 526e7ce5
......@@ -168,8 +168,6 @@ static int minix_rmdir(struct inode * dir, struct dentry *dentry)
struct inode * inode = dentry->d_inode;
int err = -ENOTEMPTY;
dentry_unhash(dentry);
if (minix_empty_dir(inode)) {
err = minix_unlink(dir, dentry);
if (!err) {
......@@ -192,9 +190,6 @@ static int minix_rename(struct inode * old_dir, struct dentry *old_dentry,
struct minix_dir_entry * old_de;
int err = -ENOENT;
if (new_inode && S_ISDIR(new_inode->i_mode))
dentry_unhash(new_dentry);
old_de = minix_find_entry(old_dentry, &old_page);
if (!old_de)
goto out;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册