Commit 705da2de authored by Sage Weil's avatar Sage Weil Committed by Al Viro

afs: remove unnecessary dentry_unhash on rmdir, dir rename

afs has no problems with references to unlinked directories.

CC: David Howells <dhowells@redhat.com>
CC: linux-afs@lists.infradead.org
Signed-off-by: default avatarSage Weil <sage@newdream.net>
Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
parent 94f9901b
...@@ -845,8 +845,6 @@ static int afs_rmdir(struct inode *dir, struct dentry *dentry) ...@@ -845,8 +845,6 @@ static int afs_rmdir(struct inode *dir, struct dentry *dentry)
_enter("{%x:%u},{%s}", _enter("{%x:%u},{%s}",
dvnode->fid.vid, dvnode->fid.vnode, dentry->d_name.name); dvnode->fid.vid, dvnode->fid.vnode, dentry->d_name.name);
dentry_unhash(dentry);
ret = -ENAMETOOLONG; ret = -ENAMETOOLONG;
if (dentry->d_name.len >= AFSNAMEMAX) if (dentry->d_name.len >= AFSNAMEMAX)
goto error; goto error;
...@@ -1148,9 +1146,6 @@ static int afs_rename(struct inode *old_dir, struct dentry *old_dentry, ...@@ -1148,9 +1146,6 @@ static int afs_rename(struct inode *old_dir, struct dentry *old_dentry,
struct key *key; struct key *key;
int ret; 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); vnode = AFS_FS_I(old_dentry->d_inode);
orig_dvnode = AFS_FS_I(old_dir); orig_dvnode = AFS_FS_I(old_dir);
new_dvnode = AFS_FS_I(new_dir); new_dvnode = AFS_FS_I(new_dir);
......
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