Eric W. Biederman f2d0a123bc mnt: Clarify and correct the disconnect logic in umount_tree
rmdir mntpoint will result in an infinite loop when there is
a mount locked on the mountpoint in another mount namespace.

This is because the logic to test to see if a mount should
be disconnected in umount_tree is buggy.

Move the logic to decide if a mount should remain connected to
it's mountpoint into it's own function disconnect_mount so that
clarity of expression instead of terseness of expression becomes
a virtue.

When the conditions where it is invalid to leave a mount connected
are first ruled out, the logic for deciding if a mount should
be disconnected becomes much clearer and simpler.

Fixes: e0c9c0afd2fc958ffa34b697972721d81df8a56f mnt: Update detach_mounts to leave mounts connected
Fixes: ce07d891a0891d3c0d0c2d73d577490486b809e1 mnt: Honor MNT_LOCKED when detaching mounts
Cc: stable@vger.kernel.org
Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
2015-07-22 20:33:27 -05:00
..
2015-06-30 19:44:57 -07:00
2015-06-23 18:02:01 -04:00
2015-06-23 18:01:59 -04:00
2015-06-25 17:00:42 -07:00
2015-06-27 09:47:46 -07:00
2015-06-23 18:01:59 -04:00
2015-06-23 18:01:59 -04:00
2015-04-21 16:16:02 -04:00
2015-04-11 22:29:40 -04:00
2015-06-02 09:22:34 -06:00
2015-04-17 09:04:12 -04:00
2015-05-31 13:23:08 +02:00
2015-06-29 12:07:04 -04:00