summaryrefslogtreecommitdiffstats
path: root/fs/namespace.c
diff options
context:
space:
mode:
authorEric W. Biederman2014-12-23 01:30:08 +0100
committerEric W. Biederman2015-04-03 03:34:18 +0200
commit590ce4bcbfb4e0462a720a4ad901e84416080bba (patch)
treee5597263904eda7b9e869e57851c6f5dd6737e47 /fs/namespace.c
parentmnt: In umount_tree reuse mnt_list instead of mnt_hash (diff)
downloadkernel-qcow2-linux-590ce4bcbfb4e0462a720a4ad901e84416080bba.tar.gz
kernel-qcow2-linux-590ce4bcbfb4e0462a720a4ad901e84416080bba.tar.xz
kernel-qcow2-linux-590ce4bcbfb4e0462a720a4ad901e84416080bba.zip
mnt: Add MNT_UMOUNT flag
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 Cc: stable@vger.kernel.org Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
Diffstat (limited to 'fs/namespace.c')
-rw-r--r--fs/namespace.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/fs/namespace.c b/fs/namespace.c
index 54cbef129f4a..d1708147eb45 100644
--- a/fs/namespace.c
+++ b/fs/namespace.c
@@ -1331,8 +1331,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) {