From: Michael Halcrow Date: Thu, 16 Nov 2006 09:19:16 +0000 (-0800) Subject: [PATCH] eCryptfs: dput() lower d_parent on rename X-Git-Tag: firefly_0821_release~31522^2~20^2~101 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=a9083081b56800691e79d541638fd2fc6366db0f;p=firefly-linux-kernel-4.4.55.git [PATCH] eCryptfs: dput() lower d_parent on rename On rename, for both the old and new lower dentry objects, eCryptfs is missing a dput on the lower parent directory dentry. This patch will prevent the BUG() at fs/dcache.c:613 from being hit after renaming a file inside eCryptfs and then doing a umount on the lower filesystem. Signed-off-by: Michael Halcrow Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/fs/ecryptfs/inode.c b/fs/ecryptfs/inode.c index ff4865d24f0f..ebec8cfc189b 100644 --- a/fs/ecryptfs/inode.c +++ b/fs/ecryptfs/inode.c @@ -630,6 +630,8 @@ ecryptfs_rename(struct inode *old_dir, struct dentry *old_dentry, ecryptfs_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_dentry); dput(lower_old_dentry); return rc;