Blame SOURCES/autofs-5.0.9-amd-lookup-fix-expire-of-external-mounts.patch

304803
autofs-5.0.9 - amd lookup fix expire of external mounts
304803
304803
From: Ian Kent <raven@themaw.net>
304803
304803
When expiring a submount it's necessary to ensure that any triggers
304803
that may have been mounted over the top of the submount by its parent
304803
are umounted so umount_subtree_mounts() is called with the parent ap.
304803
304803
But this can lead to an out of order umount. So far this hasn't been
304803
a problem but if this happens when expiring an amd mount that refers
304803
to an external mount the amd mount structure can't be found (since
304803
we are looking in the parent ap) and subsequently the external mount
304803
doesn't get checked and umounted.
304803
304803
So restrict the call to umount_subtree_mounts() to umount only offset
304803
mounts by passing is_autofs_fs as 1 always.
304803
---
304803
 daemon/automount.c |    2 +-
304803
 1 file changed, 1 insertion(+), 1 deletion(-)
304803
304803
diff --git a/daemon/automount.c b/daemon/automount.c
304803
index 9d9ba7b..a6a9321 100644
304803
--- a/daemon/automount.c
304803
+++ b/daemon/automount.c
304803
@@ -628,7 +628,7 @@ int umount_multi(struct autofs_point *ap, const char *path, int incl)
304803
 	 * parent may have mounted over top of us.
304803
 	 */
304803
 	if (ap->submount)
304803
-		left += umount_subtree_mounts(ap->parent, path, is_autofs_fs);
304803
+		left += umount_subtree_mounts(ap->parent, path, 1);
304803
 
304803
 	left += umount_subtree_mounts(ap, path, is_autofs_fs);
304803