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

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