OSDN Git Service

mnt: Don't propagate unmounts to locked mounts
authorEric W. Biederman <ebiederm@xmission.com>
Mon, 5 Jan 2015 19:38:04 +0000 (13:38 -0600)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 6 May 2015 20:03:51 +0000 (22:03 +0200)
commit928116b22b1eb446c59a0fb93857d7a6d80930af
treed03f484af63de4af6f911e84d45dcefd4d82f7e9
parent397dd1fc1225b478824134ddd5540f889b13809d
mnt: Don't propagate unmounts to locked mounts

commit 0c56fe31420ca599c90240315f7959bf1b4eb6ce upstream.

If the first mount in shared subtree is locked don't unmount the
shared subtree.

This is ensured by walking through the mounts parents before children
and marking a mount as unmountable if it is not locked or it is locked
but it's parent is marked.

This allows recursive mount detach to propagate through a set of
mounts when unmounting them would not reveal what is under any locked
mount.

Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/pnode.c
fs/pnode.h