mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] eCryptfs: Swap dput() and mntput()
@ 2008-03-17 18:38 Michael Halcrow
  0 siblings, 0 replies; only message in thread
From: Michael Halcrow @ 2008-03-17 18:38 UTC (permalink / raw)
  To: akpm; +Cc: Rajouri Jammu, linux-kernel, sandeen

ecryptfs_d_release() is doing a mntput before doing the dput. This
patch moves the dput before the mntput.

Thanks to Rajouri Jammu for reporting this.

Signed-off-by: Michael Halcrow <mhalcrow@us.ibm.com>
---

diff --git a/fs/ecryptfs/dentry.c b/fs/ecryptfs/dentry.c
index 841a032..5e59658 100644
--- a/fs/ecryptfs/dentry.c
+++ b/fs/ecryptfs/dentry.c
@@ -80,8 +80,8 @@ static void ecryptfs_d_release(struct dentry *dentry)
 {
 	if (ecryptfs_dentry_to_private(dentry)) {
 		if (ecryptfs_dentry_to_lower(dentry)) {
-			mntput(ecryptfs_dentry_to_lower_mnt(dentry));
 			dput(ecryptfs_dentry_to_lower(dentry));
+			mntput(ecryptfs_dentry_to_lower_mnt(dentry));
 		}
 		kmem_cache_free(ecryptfs_dentry_info_cache,
 				ecryptfs_dentry_to_private(dentry));

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2008-03-17 18:46 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-03-17 18:38 [PATCH] eCryptfs: Swap dput() and mntput() Michael Halcrow

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®