eCryptfs: Remove extra d_delete in ecryptfs_rmdir
authorTyler Hicks <tyhicks@linux.vnet.ibm.com>
Tue, 12 Apr 2011 16:21:36 +0000 (11:21 -0500)
committerTyler Hicks <tyhicks@linux.vnet.ibm.com>
Mon, 25 Apr 2011 23:32:35 +0000 (18:32 -0500)
vfs_rmdir() already calls d_delete() on the lower dentry. That was being
duplicated in ecryptfs_rmdir() and caused a NULL pointer dereference
when NFSv3 was the lower filesystem.

Signed-off-by: Tyler Hicks <tyhicks@linux.vnet.ibm.com>
fs/ecryptfs/inode.c

index f99051b7adab1e7e107cc40e40bb39d57e20e5c1..9c3c2f5bc6a6e71dc9f21582f7a356ef254cdba2 100644 (file)
@@ -538,8 +538,6 @@ static int ecryptfs_rmdir(struct inode *dir, struct dentry *dentry)
        dget(lower_dentry);
        rc = vfs_rmdir(lower_dir_dentry->d_inode, lower_dentry);
        dput(lower_dentry);
-       if (!rc)
-               d_delete(lower_dentry);
        fsstack_copy_attr_times(dir, lower_dir_dentry->d_inode);
        dir->i_nlink = lower_dir_dentry->d_inode->i_nlink;
        unlock_dir(lower_dir_dentry);