mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Michael Halcrow <mhalcrow@us.ibm.com>
To: akpm@osdl.org
Cc: linux-kernel@vger.kernel.org, mhalcrow@us.ibm.com
Subject: [PATCH] eCryptfs: mntput() lower mount on umount_begin()
Date: Thu, 24 Aug 2006 15:02:45 -0500	[thread overview]
Message-ID: <20060824200245.GB3117@us.ibm.com> (raw)

On unmount, eCryptfs needs to decrement the mount count of the lower
mount, or else you cannot unmount the lower filesystem.

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

---

 fs/ecryptfs/super.c |    6 ++----
 1 files changed, 2 insertions(+), 4 deletions(-)

bcc1939b87a3df14a9b975bdfde47dd5b230a6e5
diff --git a/fs/ecryptfs/super.c b/fs/ecryptfs/super.c
index 120f060..f4f06ea 100644
--- a/fs/ecryptfs/super.c
+++ b/fs/ecryptfs/super.c
@@ -144,10 +144,7 @@ static void ecryptfs_clear_inode(struct 
 /**
  * ecryptfs_umount_begin
  *
- * Called in do_umount() if the MNT_FORCE flag was used and this
- * function is defined.  See comment in linux/fs/super.c:do_umount().
- * Used only in nfs, to kill any pending RPC tasks, so that subsequent
- * code can actually succeed and won't leave tasks that need handling.
+ * Called in do_umount().
  */
 static void ecryptfs_umount_begin(struct vfsmount *vfsmnt, int flags)
 {
@@ -155,6 +152,7 @@ static void ecryptfs_umount_begin(struct
 		ecryptfs_dentry_to_lower_mnt(vfsmnt->mnt_sb->s_root);
 	struct super_block *lower_sb;
 
+	mntput(lower_mnt);
 	lower_sb = lower_mnt->mnt_sb;
 	if (lower_sb->s_op->umount_begin)
 		lower_sb->s_op->umount_begin(lower_mnt, flags);
-- 
1.3.3


                 reply	other threads:[~2006-08-24 20:02 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20060824200245.GB3117@us.ibm.com \
    --to=mhalcrow@us.ibm.com \
    --cc=akpm@osdl.org \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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®