Skip to content

Commit

Permalink
afs: remove unnecessary dentry_unhash on rmdir, dir rename
Browse files Browse the repository at this point in the history
afs has no problems with references to unlinked directories.

CC: David Howells <[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 94f9901 commit 705da2d
Showing 1 changed file with 0 additions and 5 deletions.
5 changes: 0 additions & 5 deletions fs/afs/dir.c
Original file line number Diff line number Diff line change
Expand Up @@ -845,8 +845,6 @@ static int afs_rmdir(struct inode *dir, struct dentry *dentry)
_enter("{%x:%u},{%s}",
dvnode->fid.vid, dvnode->fid.vnode, dentry->d_name.name);

dentry_unhash(dentry);

ret = -ENAMETOOLONG;
if (dentry->d_name.len >= AFSNAMEMAX)
goto error;
Expand Down Expand Up @@ -1148,9 +1146,6 @@ static int afs_rename(struct inode *old_dir, struct dentry *old_dentry,
struct key *key;
int ret;

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

vnode = AFS_FS_I(old_dentry->d_inode);
orig_dvnode = AFS_FS_I(old_dir);
new_dvnode = AFS_FS_I(new_dir);
Expand Down

0 comments on commit 705da2d

Please sign in to comment.