Skip to content

Commit

Permalink
hostfs: remove unnecessary dentry_unhash on rmdir, dir rename
Browse files Browse the repository at this point in the history
hostfs does not have problems with references to unlinked directories.

CC: Jeff Dike <[email protected]>
CC: Richard Weinberger <[email protected]>
CC: [email protected]
Signed-off-by: Sage Weil <[email protected]>
Signed-off-by: Al Viro <[email protected]>
  • Loading branch information
liewegas authored and Al Viro committed May 28, 2011
1 parent e391178 commit e41a59e
Showing 1 changed file with 0 additions and 5 deletions.
5 changes: 0 additions & 5 deletions fs/hostfs/hostfs_kern.c
Original file line number Diff line number Diff line change
Expand Up @@ -683,8 +683,6 @@ int hostfs_rmdir(struct inode *ino, struct dentry *dentry)
char *file;
int err;

dentry_unhash(dentry);

if ((file = dentry_name(dentry)) == NULL)
return -ENOMEM;
err = do_rmdir(file);
Expand Down Expand Up @@ -738,9 +736,6 @@ int hostfs_rename(struct inode *from_ino, struct dentry *from,
char *from_name, *to_name;
int err;

if (to->d_inode && S_ISDIR(to->d_inode->i_mode))
dentry_unhash(to);

if ((from_name = dentry_name(from)) == NULL)
return -ENOMEM;
if ((to_name = dentry_name(to)) == NULL) {
Expand Down

0 comments on commit e41a59e

Please sign in to comment.