Blame SOURCES/autofs-5.1.8-remove-nonstrict-parameter-from-tree_mapent_umount_offsets.patch

792147
autofs-5.1.8 - remove nonstrict parameter from tree_mapent_umount_offsets()
792147
792147
From: Ian Kent <raven@themaw.net>
792147
792147
The nonstrict parameter of tree_mapent_umount_offsets() ins't useful
792147
because if a real mount at the base of a sub-tree fails to umount all
792147
we can do is re-instate the offset mounts under it which must succeed
792147
for the mount tree to remain useful.
792147
792147
Signed-off-by: Ian Kent <raven@themaw.net>
792147
---
792147
 CHANGELOG          |    1 +
792147
 daemon/automount.c |    2 +-
792147
 include/mounts.h   |    2 +-
792147
 lib/mounts.c       |    6 +++---
792147
 4 files changed, 6 insertions(+), 5 deletions(-)
792147
792147
--- autofs-5.1.4.orig/CHANGELOG
792147
+++ autofs-5.1.4/CHANGELOG
792147
@@ -92,6 +92,7 @@
792147
 - fix memory leak in xdr_exports().
792147
 - avoid calling pthread_getspecific() with NULL key_thread_attempt_id.
792147
 - fix sysconf(3) return handling.
792147
+- remove nonstrict parameter from tree_mapent_umount_offsets().
792147
 
792147
 xx/xx/2018 autofs-5.1.5
792147
 - fix flag file permission.
792147
--- autofs-5.1.4.orig/daemon/automount.c
792147
+++ autofs-5.1.4/daemon/automount.c
792147
@@ -555,7 +555,7 @@ static int umount_subtree_mounts(struct
792147
 		struct mapent *tmp;
792147
 		int ret;
792147
 
792147
-		ret = tree_mapent_umount_offsets(me, 1);
792147
+		ret = tree_mapent_umount_offsets(me);
792147
 		if (!ret) {
792147
 			warn(ap->logopt,
792147
 			     "some offset mounts still present under %s", path);
792147
--- autofs-5.1.4.orig/include/mounts.h
792147
+++ autofs-5.1.4/include/mounts.h
792147
@@ -182,7 +182,7 @@ int tree_mapent_add_node(struct mapent_c
792147
 int tree_mapent_delete_offsets(struct mapent_cache *mc, const char *key);
792147
 void tree_mapent_cleanup_offsets(struct mapent *oe);
792147
 int tree_mapent_mount_offsets(struct mapent *oe, int nonstrict);
792147
-int tree_mapent_umount_offsets(struct mapent *oe, int nonstrict);
792147
+int tree_mapent_umount_offsets(struct mapent *oe);
792147
 int unlink_mount_tree(struct autofs_point *ap, const char *mp);
792147
 void free_mnt_list(struct mnt_list *list);
792147
 int is_mounted(const char *mp, unsigned int type);
792147
--- autofs-5.1.4.orig/lib/mounts.c
792147
+++ autofs-5.1.4/lib/mounts.c
792147
@@ -1843,7 +1843,7 @@ static int tree_mapent_umount_offset(str
792147
 	 * Check for and umount subtree offsets resulting from
792147
 	 * nonstrict mount fail.
792147
 	 */
792147
-	ret = tree_mapent_umount_offsets(oe, ctxt->strict);
792147
+	ret = tree_mapent_umount_offsets(oe);
792147
 	if (!ret)
792147
 		return 0;
792147
 
792147
@@ -1975,14 +1975,14 @@ static int tree_mapent_umount_offsets_wo
792147
 	return tree_mapent_umount_offset(oe, ptr);
792147
 }
792147
 
792147
-int tree_mapent_umount_offsets(struct mapent *oe, int nonstrict)
792147
+int tree_mapent_umount_offsets(struct mapent *oe)
792147
 {
792147
 	struct tree_node *base = MAPENT_NODE(oe);
792147
 	struct autofs_point *ap = oe->mc->ap;
792147
 	struct traverse_subtree_context ctxt = {
792147
 		.ap = ap,
792147
 		.base = base,
792147
-		.strict = !nonstrict,
792147
+		.strict = 1,
792147
 	};
792147
 	int ret;
792147