summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTyler Hicks <tyhicks@linux.vnet.ibm.com>2011-04-12 11:21:36 -0500
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2012-03-04 09:49:22 -0800
commit12a9959bcc17eca2567447abfab2ca7f7ebac594 (patch)
treee65345744be199b4f67db94dcedfa3cb9507e62d
parent3c9b2dad7e98a942c6bca63bb95b66c0b3c9d0fd (diff)
downloadlwn-12a9959bcc17eca2567447abfab2ca7f7ebac594.tar.gz
lwn-12a9959bcc17eca2567447abfab2ca7f7ebac594.zip
eCryptfs: Remove extra d_delete in ecryptfs_rmdir
commit 35ffa948b2f7bdf79e488cd496232935d095087a upstream. 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. BugLink: http://bugs.launchpad.net/bugs/723518 Signed-off-by: Tyler Hicks <tyhicks@linux.vnet.ibm.com> Signed-off-by: Colin King <colin.king@canonical.com> Signed-off-by: Tim Gardner <tim.gardner@canonical.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--fs/ecryptfs/inode.c2
1 files changed, 0 insertions, 2 deletions
diff --git a/fs/ecryptfs/inode.c b/fs/ecryptfs/inode.c
index 7ce54717f9d9..79ae6a7b20a1 100644
--- a/fs/ecryptfs/inode.c
+++ b/fs/ecryptfs/inode.c
@@ -575,8 +575,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);