Skip to contentSkip to conversation

eCryptfs: mntput() lower mount on umount_begin()

PATCH New Michael Halcrow 1 participant 1 message Aug 24, 2006 Ecrypt file system

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 eCryptfs: mntput() lower mount on umount_begin()

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

---

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

bcc1939b87a3df14a9b975bdfde47dd5b230a6e5

fs/ecryptfs/super.c +2 -4
index 120f060..f4f06ea 100644
@@ -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);
Signature · 1 line
1.3.3