summaryrefslogtreecommitdiff
path: root/fs
diff options
context:
space:
mode:
authorEric W. Biederman <ebiederm@xmission.com>2014-12-22 18:30:08 -0600
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2015-05-06 22:03:50 +0200
commit7052e71b2d085f76800115d4a212dcaf82b86262 (patch)
tree2d719cc7f0e189f4784cca5443e811191227b83e /fs
parent953bab2cb35f8f6f2a0183c1b27ff7466f72bccc (diff)
mnt: Add MNT_UMOUNT flag
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>
Diffstat (limited to 'fs')
-rw-r--r--fs/namespace.c4
-rw-r--r--fs/pnode.c1
2 files changed, 4 insertions, 1 deletions
diff --git a/fs/namespace.c b/fs/namespace.c
index 18df0af605ba..9f3c7e596b10 100644
--- a/fs/namespace.c
+++ b/fs/namespace.c
@@ -1333,8 +1333,10 @@ static void umount_tree(struct mount *mnt, enum umount_tree_flags how)
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) {
diff --git a/fs/pnode.c b/fs/pnode.c
index bf012af709dd..ac3aa0d43b90 100644
--- a/fs/pnode.c
+++ b/fs/pnode.c
@@ -384,6 +384,7 @@ static void __propagate_umount(struct mount *mnt)
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);
}
}