VisionFive2 Linux kernel

StarFive Tech Linux Kernel for VisionFive (JH7110) boards (mirror)

More than 9999 Commits   32 Branches   54 Tags
author: Michael Halcrow <mhalcrow@us.ibm.com> 2006-10-30 22:07:20 -0800 committer: Linus Torvalds <torvalds@g5.osdl.org> 2006-10-31 08:07:01 -0800 commit: 45ec4ababe999cb95f9c0cad03b2689cb0b77a2b parent: 316bb95e8ed0ddcd767e8aa54264b6c6190f150c
Commit Summary:
[PATCH] eCryptfs: Fix handling of lower d_count
Diffstat:
1 file changed, 6 insertions, 1 deletion
diff --git a/fs/ecryptfs/dentry.c b/fs/ecryptfs/dentry.c
index f0d2a433242b..0b9992ab990f 100644
--- a/fs/ecryptfs/dentry.c
+++ b/fs/ecryptfs/dentry.c
@@ -24,6 +24,7 @@
 
 #include <linux/dcache.h>
 #include <linux/namei.h>
+#include <linux/mount.h>
 #include "ecryptfs_kernel.h"
 
 /**
@@ -76,8 +77,13 @@ static void ecryptfs_d_release(struct dentry *dentry)
 	if (ecryptfs_dentry_to_private(dentry))
 		kmem_cache_free(ecryptfs_dentry_info_cache,
 				ecryptfs_dentry_to_private(dentry));
-	if (lower_dentry)
+	if (lower_dentry) {
+		struct vfsmount *lower_mnt =
+			ecryptfs_dentry_to_lower_mnt(dentry);
+
+		mntput(lower_mnt);
 		dput(lower_dentry);
+	}
 	return;
 }