afs: remove unnecessary dentry_unhash on rmdir, dir rename
authorSage Weil <sage@newdream.net>
Fri, 27 May 2011 20:42:13 +0000 (13:42 -0700)
committerAl Viro <viro@zeniv.linux.org.uk>
Sat, 28 May 2011 05:02:53 +0000 (01:02 -0400)
afs has no problems with references to unlinked directories.

CC: David Howells <dhowells@redhat.com>
CC: linux-afs@lists.infradead.org
Signed-off-by: Sage Weil <sage@newdream.net>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
fs/afs/dir.c

index 2c4e051600420381e647f0d35810961e355d99f4..20c106f2492740f7de1615ee7712207b74a33828 100644 (file)
@@ -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;
@@ -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);