]> git.openpandora.org Git - pandora-kernel.git/commitdiff
mnt: On an unmount propagate clearing of MNT_LOCKED
authorEric W. Biederman <ebiederm@xmission.com>
Sat, 3 Jan 2015 11:39:35 +0000 (05:39 -0600)
committerEric W. Biederman <ebiederm@xmission.com>
Fri, 3 Apr 2015 01:34:19 +0000 (20:34 -0500)
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.

Cc: stable@vger.kernel.org
Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
fs/namespace.c
fs/pnode.c
fs/pnode.h

index 083e3401a80854a0f131ebc02cf2c89644b79b73..2b12b7a9455d0b60bc6a0498c18264090321a3d1 100644 (file)
@@ -1333,6 +1333,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;
diff --cc fs/pnode.c
Simple merge
diff --cc fs/pnode.h
Simple merge