* Patch "mnt: Factor umount_mnt from umount_tree" has been added to the 4.0-stable tree
@ 2015-05-02 15:56 gregkh
0 siblings, 0 replies; only message in thread
From: gregkh @ 2015-05-02 15:56 UTC (permalink / raw)
To: ebiederm, gregkh; +Cc: stable, stable-commits
This is a note to let you know that I've just added the patch titled
mnt: Factor umount_mnt from umount_tree
to the 4.0-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
The filename of the patch is:
mnt-factor-umount_mnt-from-umount_tree.patch
and it can be found in the queue-4.0 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@vger.kernel.org> know about it.
>From 6a46c5735c29175da55b2fa9d53775182422cdd7 Mon Sep 17 00:00:00 2001
From: "Eric W. Biederman" <ebiederm@xmission.com>
Date: Thu, 15 Jan 2015 22:58:33 -0600
Subject: mnt: Factor umount_mnt from umount_tree
From: "Eric W. Biederman" <ebiederm@xmission.com>
commit 6a46c5735c29175da55b2fa9d53775182422cdd7 upstream.
For future use factor out a function umount_mnt from umount_tree.
This function unhashes a mount and remembers where the mount
was mounted so that eventually when the code makes it to a
sleeping context the mountpoint can be dput.
Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
fs/namespace.c | 14 +++++++++++---
1 file changed, 11 insertions(+), 3 deletions(-)
--- a/fs/namespace.c
+++ b/fs/namespace.c
@@ -822,6 +822,16 @@ static void detach_mnt(struct mount *mnt
/*
* vfsmount lock must be held for write
*/
+static void umount_mnt(struct mount *mnt)
+{
+ /* old mountpoint will be dropped when we can do that */
+ mnt->mnt_ex_mountpoint = mnt->mnt_mountpoint;
+ unhash_mnt(mnt);
+}
+
+/*
+ * vfsmount lock must be held for write
+ */
void mnt_set_mountpoint(struct mount *mnt,
struct mountpoint *mp,
struct mount *child_mnt)
@@ -1373,9 +1383,7 @@ static void umount_tree(struct mount *mn
pin_insert_group(&p->mnt_umount, &p->mnt_parent->mnt, &unmounted);
if (mnt_has_parent(p)) {
mnt_add_count(p->mnt_parent, -1);
- /* old mountpoint will be dropped when we can do that */
- p->mnt_ex_mountpoint = p->mnt_mountpoint;
- unhash_mnt(p);
+ umount_mnt(p);
}
change_mnt_propagation(p, MS_PRIVATE);
}
Patches currently in stable-queue which might be from ebiederm@xmission.com are
queue-4.0/mnt-don-t-propagate-umounts-in-__detach_mounts.patch
queue-4.0/mnt-add-mnt_umount-flag.patch
queue-4.0/mnt-honor-mnt_locked-when-detaching-mounts.patch
queue-4.0/mnt-delay-removal-from-the-mount-hash.patch
queue-4.0/mnt-on-an-unmount-propagate-clearing-of-mnt_locked.patch
queue-4.0/mnt-don-t-propagate-unmounts-to-locked-mounts.patch
queue-4.0/mnt-factor-out-unhash_mnt-from-detach_mnt-and-umount_tree.patch
queue-4.0/mnt-factor-umount_mnt-from-umount_tree.patch
queue-4.0/mnt-fix-the-error-check-in-__detach_mounts.patch
queue-4.0/mnt-update-detach_mounts-to-leave-mounts-connected.patch
queue-4.0/mnt-improve-the-umount_tree-flags.patch
queue-4.0/mnt-in-umount_tree-reuse-mnt_list-instead-of-mnt_hash.patch
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2015-05-02 15:56 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-05-02 15:56 Patch "mnt: Factor umount_mnt from umount_tree" has been added to the 4.0-stable tree gregkh
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).