]> git.baikalelectronics.ru Git - kernel.git/commit
mnt: Honor MNT_LOCKED when detaching mounts
authorEric W. Biederman <ebiederm@xmission.com>
Wed, 24 Dec 2014 03:37:03 +0000 (21:37 -0600)
committerEric W. Biederman <ebiederm@xmission.com>
Thu, 9 Apr 2015 16:39:55 +0000 (11:39 -0500)
commit0706e207e2b4737923975de98ccdadac6b8e88a4
treeb27cd472257302edfd6689e98b9991fa7d648ae0
parentb6ae3c7ff4160c0c0ad644c39f6f41975476b3b8
mnt: Honor MNT_LOCKED when detaching mounts

Modify umount(MNT_DETACH) to keep mounts in the hash table that are
locked to their parent mounts, when the parent is lazily unmounted.

In mntput_no_expire detach the children from the hash table, depending
on mnt_pin_kill in cleanup_mnt to decrement the mnt_count of the children.

In __detach_mounts if there are any mounts that have been unmounted
but still are on the list of mounts of a mountpoint, remove their
children from the mount hash table and those children to the unmounted
list so they won't linger potentially indefinitely waiting for their
final mntput, now that the mounts serve no purpose.

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