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

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