]> git.baikalelectronics.ru Git - kernel.git/commit
mnt: Don't propagate umounts in __detach_mounts
authorEric W. Biederman <ebiederm@xmission.com>
Wed, 24 Dec 2014 13:35:10 +0000 (07:35 -0600)
committerEric W. Biederman <ebiederm@xmission.com>
Fri, 3 Apr 2015 01:34:17 +0000 (20:34 -0500)
commit451911e91f0c4a80f3648b6d2a6e87fb7c2c136b
tree33fd107b9cddaf6208e8d6b916cf2bd664b274c1
parent0b43c268698059308bb5fc2e8d50142c2e8bae41
mnt: Don't propagate umounts in __detach_mounts

Invoking mount propagation from __detach_mounts is inefficient and
wrong.

It is inefficient because __detach_mounts already walks the list of
mounts that where something needs to be done, and mount propagation
walks some subset of those mounts again.

It is actively wrong because if the dentry that is passed to
__detach_mounts is not part of the path to a mount that mount should
not be affected.

change_mnt_propagation(p,MS_PRIVATE) modifies the mount propagation
tree of a master mount so it's slaves are connected to another master
if possible.  Which means even removing a mount from the middle of a
mount tree with __detach_mounts will not deprive any mount propagated
mount events.

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