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

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