autofs/SOURCES/autofs-5.1.7-add-set_offset_tree_catatonic.patch
2021-12-08 12:28:52 +00:00

47 lines
1.2 KiB
Diff

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