Commit e41a59e0 authored by Sage Weil's avatar Sage Weil Committed by Al Viro

hostfs: remove unnecessary dentry_unhash on rmdir, dir rename

hostfs does not have problems with references to unlinked directories.

CC: Jeff Dike <jdike@addtoit.com>
CC: Richard Weinberger <richard@nod.at>
CC: user-mode-linux-devel@lists.sourceforge.net
Signed-off-by: default avatarSage Weil <sage@newdream.net>
Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
parent e3911785
...@@ -683,8 +683,6 @@ int hostfs_rmdir(struct inode *ino, struct dentry *dentry) ...@@ -683,8 +683,6 @@ int hostfs_rmdir(struct inode *ino, struct dentry *dentry)
char *file; char *file;
int err; int err;
dentry_unhash(dentry);
if ((file = dentry_name(dentry)) == NULL) if ((file = dentry_name(dentry)) == NULL)
return -ENOMEM; return -ENOMEM;
err = do_rmdir(file); err = do_rmdir(file);
...@@ -738,9 +736,6 @@ int hostfs_rename(struct inode *from_ino, struct dentry *from, ...@@ -738,9 +736,6 @@ int hostfs_rename(struct inode *from_ino, struct dentry *from,
char *from_name, *to_name; char *from_name, *to_name;
int err; int err;
if (to->d_inode && S_ISDIR(to->d_inode->i_mode))
dentry_unhash(to);
if ((from_name = dentry_name(from)) == NULL) if ((from_name = dentry_name(from)) == NULL)
return -ENOMEM; return -ENOMEM;
if ((to_name = dentry_name(to)) == NULL) { if ((to_name = dentry_name(to)) == NULL) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment