* Patch "mnt: Add MNT_UMOUNT flag" 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: Add MNT_UMOUNT flag
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-add-mnt_umount-flag.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 590ce4bcbfb4e0462a720a4ad901e84416080bba Mon Sep 17 00:00:00 2001
From: "Eric W. Biederman" <ebiederm@xmission.com>
Date: Mon, 22 Dec 2014 18:30:08 -0600
Subject: mnt: Add MNT_UMOUNT flag
From: "Eric W. Biederman" <ebiederm@xmission.com>
commit 590ce4bcbfb4e0462a720a4ad901e84416080bba upstream.
In some instances it is necessary to know if the the unmounting
process has begun on a mount. Add MNT_UMOUNT to make that reliably
testable.
This fix gets used in fixing locked mounts in MNT_DETACH
Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
fs/namespace.c | 4 +++-
fs/pnode.c | 1 +
include/linux/mount.h | 1 +
3 files changed, 5 insertions(+), 1 deletion(-)
--- a/fs/namespace.c
+++ b/fs/namespace.c
@@ -1333,8 +1333,10 @@ static void umount_tree(struct mount *mn
struct mount *p;
/* Gather the mounts to umount */
- for (p = mnt; p; p = next_mnt(p, mnt))
+ for (p = mnt; p; p = next_mnt(p, mnt)) {
+ p->mnt.mnt_flags |= MNT_UMOUNT;
list_move(&p->mnt_list, &tmp_list);
+ }
/* Hide the mounts from lookup_mnt and mnt_mounts */
list_for_each_entry(p, &tmp_list, mnt_list) {
--- a/fs/pnode.c
+++ b/fs/pnode.c
@@ -384,6 +384,7 @@ static void __propagate_umount(struct mo
if (child && list_empty(&child->mnt_mounts)) {
list_del_init(&child->mnt_child);
hlist_del_init_rcu(&child->mnt_hash);
+ child->mnt.mnt_flags |= MNT_UMOUNT;
list_move_tail(&child->mnt_list, &mnt->mnt_list);
}
}
--- a/include/linux/mount.h
+++ b/include/linux/mount.h
@@ -61,6 +61,7 @@ struct mnt_namespace;
#define MNT_DOOMED 0x1000000
#define MNT_SYNC_UMOUNT 0x2000000
#define MNT_MARKED 0x4000000
+#define MNT_UMOUNT 0x8000000
struct vfsmount {
struct dentry *mnt_root; /* root of the mounted tree */
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: Add MNT_UMOUNT flag" 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).