eCryptfs: dput dentries returned from dget_parent
authorTyler Hicks <tyhicks@linux.vnet.ibm.com>
Tue, 12 Apr 2011 16:23:09 +0000 (11:23 -0500)
committerTyler Hicks <tyhicks@linux.vnet.ibm.com>
Mon, 25 Apr 2011 23:32:36 +0000 (18:32 -0500)
Call dput on the dentries previously returned by dget_parent() in
ecryptfs_rename(). This is needed for supported eCryptfs mounts on top
of the NFSv3 client.

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

index 9c3c2f5..72d3576 100644 (file)
@@ -608,8 +608,8 @@ ecryptfs_rename(struct inode *old_dir, struct dentry *old_dentry,
                fsstack_copy_attr_all(old_dir, lower_old_dir_dentry->d_inode);
 out_lock:
        unlock_rename(lower_old_dir_dentry, lower_new_dir_dentry);
-       dput(lower_new_dentry->d_parent);
-       dput(lower_old_dentry->d_parent);
+       dput(lower_new_dir_dentry);
+       dput(lower_old_dir_dentry);
        dput(lower_new_dentry);
        dput(lower_old_dentry);
        return rc;