diff options
author | Eric W. Biederman <ebiederm@xmission.com> | 2015-01-03 05:39:35 -0600 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2015-05-06 22:03:51 +0200 |
commit | 397dd1fc1225b478824134ddd5540f889b13809d (patch) | |
tree | 4d7eef657f69531ff3ba36283aca6ad1cd499115 /fs/namespace.c | |
parent | 7a9742a65c02e30a62ae42c765eb4dff26b51cc9 (diff) |
mnt: On an unmount propagate clearing of MNT_LOCKED
commit 5d88457eb5b86b475422dc882f089203faaeedb5 upstream.
A prerequisite of calling umount_tree is that the point where the tree
is mounted at is valid to unmount.
If we are propagating the effect of the unmount clear MNT_LOCKED in
every instance where the same filesystem is mounted on the same
mountpoint in the mount tree, as we know (by virtue of the fact
that umount_tree was called) that it is safe to reveal what
is at that mountpoint.
Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'fs/namespace.c')
-rw-r--r-- | fs/namespace.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/fs/namespace.c b/fs/namespace.c index 6c477be73346..7d9a69dbf10d 100644 --- a/fs/namespace.c +++ b/fs/namespace.c @@ -1335,6 +1335,9 @@ static void umount_tree(struct mount *mnt, enum umount_tree_flags how) LIST_HEAD(tmp_list); struct mount *p; + if (how & UMOUNT_PROPAGATE) + propagate_mount_unlock(mnt); + /* Gather the mounts to umount */ for (p = mnt; p; p = next_mnt(p, mnt)) { p->mnt.mnt_flags |= MNT_UMOUNT; |