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

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