autofs-5.1.8 - dont call umount_subtree_mounts() on parent at umount

From: Ian Kent <raven@themaw.net>

There shouldn't be any multi-mount offsets mounted within a submount
because the submount will be a nesting point and offsets will be mounted
within it when it gets mounted and expired before it's umounted.

Signed-off-by: Ian Kent <raven@themaw.net>
---
 CHANGELOG          |    1 +
 daemon/automount.c |    7 -------
 2 files changed, 1 insertion(+), 7 deletions(-)

diff --git a/CHANGELOG b/CHANGELOG
index 43f1c0e3..45d085d5 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -83,6 +83,7 @@
 - remove redundant stat call in lookup_ghost().
 - set mapent dev and ino before adding to index.
 - change to use printf functions in amd parser.
+- dont call umount_subtree_mounts() on parent at umount.
 
 19/10/2021 autofs-5.1.8
 - add xdr_exports().
diff --git a/daemon/automount.c b/daemon/automount.c
index 4b5a58d7..30f7a7e5 100644
--- a/daemon/automount.c
+++ b/daemon/automount.c
@@ -721,13 +721,6 @@ int umount_multi(struct autofs_point *ap, const char *path, int incl)
 
 	left = 0;
 
-	/*
-	 * If we are a submount we need to umount any offsets our
-	 * parent may have mounted over top of us.
-	 */
-	if (ap->submount)
-		left += umount_subtree_mounts(ap->parent, path, 1);
-
 	left += umount_subtree_mounts(ap, path, is_autofs_fs);
 
 	/* Delete detritus like unwanted mountpoints and symlinks */