OSDN Git Service

mnt: Delay removal from the mount hash.
authorEric W. Biederman <ebiederm@xmission.com>
Tue, 23 Dec 2014 01:12:07 +0000 (19:12 -0600)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 6 May 2015 20:03:51 +0000 (22:03 +0200)
commit7a9742a65c02e30a62ae42c765eb4dff26b51cc9
tree96bfe612f8b2eb6edcb2b91d95a2303f5055d289
parent7052e71b2d085f76800115d4a212dcaf82b86262
mnt: Delay removal from the mount hash.

commit 411a938b5abc9cb126c41cccf5975ae464fe0f3e upstream.

- Modify __lookup_mnt_hash_last to ignore mounts that have MNT_UMOUNTED set.
- Don't remove mounts from the mount hash table in propogate_umount
- Don't remove mounts from the mount hash table in umount_tree before
  the entire list of mounts to be umounted is selected.
- Remove mounts from the mount hash table as the last thing that
  happens in the case where a mount has a parent in umount_tree.
  Mounts without parents are not hashed (by definition).

This paves the way for delaying removal from the mount hash table even
farther and fixing the MNT_LOCKED vs MNT_DETACH issue.

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