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

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