Skip to contentSkip to conversation

eCryptfs: dput() lower d_parent on rename

PATCH New Michael Halcrow 1 participant 1 message Nov 14, 2006 Ecrypt file system

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 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.

---

 fs/ecryptfs/inode.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

ad6bdd754bf12f926bf6b2e528d085177bce9def

fs/ecryptfs/inode.c +2 -0
index fc0f624..dfcc684 100644
@@ -631,6 +631,8 @@ ecryptfs_rename(struct inode *old_dir, s
 		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;
Signature · 1 line
1.3.3