Blame SOURCES/autofs-5.1.7-add-set_offset_tree_catatonic.patch

beb904
autofs-5.1.7 - add set_offset_tree_catatonic()
beb904
beb904
From: Ian Kent <raven@themaw.net>
beb904
beb904
Add tree mapent support function set_offset_tree_catatonic().
beb904
beb904
Signed-off-by: Ian Kent <raven@themaw.net>
beb904
---
beb904
 CHANGELOG    |    1 +
beb904
 lib/mounts.c |   15 +++++++++++++++
beb904
 2 files changed, 16 insertions(+)
beb904
beb904
--- autofs-5.1.4.orig/CHANGELOG
beb904
+++ autofs-5.1.4/CHANGELOG
beb904
@@ -38,6 +38,7 @@
beb904
 - add tree_mapent_traverse_subtree().
beb904
 - fix mount_fullpath().
beb904
 - add tree_mapent_cleanup_offsets().
beb904
+- add set_offset_tree_catatonic().
beb904
 
beb904
 xx/xx/2018 autofs-5.1.5
beb904
 - fix flag file permission.
beb904
--- autofs-5.1.4.orig/lib/mounts.c
beb904
+++ autofs-5.1.4/lib/mounts.c
beb904
@@ -2574,6 +2574,21 @@ static int set_mount_catatonic(struct au
beb904
 	return 0;
beb904
 }
beb904
 
beb904
+static int set_offset_tree_catatonic_work(struct tree_node *n, void *ptr)
beb904
+{
beb904
+	struct mapent *me = MAPENT(n);
beb904
+	struct autofs_point *ap = me->mc->ap;
beb904
+
beb904
+	set_mount_catatonic(ap, me, me->ioctlfd);
beb904
+
beb904
+	return 1;
beb904
+}
beb904
+
beb904
+static void set_offset_tree_catatonic(struct autofs_point *ap, struct mapent *me)
beb904
+{
beb904
+	tree_traverse_inorder(MAPENT_ROOT(me), set_offset_tree_catatonic_work, NULL);
beb904
+}
beb904
+
beb904
 static void set_multi_mount_tree_catatonic(struct autofs_point *ap, struct mapent *me)
beb904
 {
beb904
 	if (!list_empty(&me->multi_list)) {