autofs/autofs-5.1.8-get-rid-entry-thid-field.patch
2023-06-16 08:13:26 +08:00

63 lines
1.7 KiB
Diff

autofs-5.1.8 - get rid entry thid field
From: Ian Kent <raven@themaw.net>
Use the autofs_point structure thid and get rid of the copy in struct
master_mapent.
Signed-off-by: Ian Kent <raven@themaw.net>
---
CHANGELOG | 1 +
daemon/master.c | 5 ++---
include/master.h | 1 -
3 files changed, 3 insertions(+), 4 deletions(-)
--- autofs-5.1.7.orig/CHANGELOG
+++ autofs-5.1.7/CHANGELOG
@@ -136,6 +136,7 @@
- fix use_ignore_mount_option description.
- include addtional log info for mounts.
- fix amd selector function matching.
+- get rid entry thid field.
25/01/2021 autofs-5.1.7
- make bind mounts propagation slave by default.
--- autofs-5.1.7.orig/daemon/master.c
+++ autofs-5.1.7/daemon/master.c
@@ -831,7 +831,6 @@ struct master_mapent *master_new_mapent(
entry->path = tmp;
entry->len = strlen(tmp);
- entry->thid = 0;
entry->age = age;
entry->master = master;
entry->current = NULL;
@@ -1413,7 +1412,7 @@ static int master_do_mount(struct master
handle_mounts_startup_cond_destroy(&suc);
return 0;
}
- entry->thid = ap->thid = thid;
+ ap->thid = thid;
handle_mounts_startup_cond_destroy(&suc);
@@ -1969,7 +1968,7 @@ int master_done(struct master *master)
entry = list_entry(p, struct master_mapent, join);
p = p->next;
list_del(&entry->join);
- pthread_join(entry->thid, NULL);
+ pthread_join(entry->ap->thid, NULL);
master_free_mapent_sources(entry, 1);
master_free_mapent(entry);
}
--- autofs-5.1.7.orig/include/master.h
+++ autofs-5.1.7/include/master.h
@@ -46,7 +46,6 @@ struct map_source {
struct master_mapent {
char *path;
size_t len;
- pthread_t thid;
time_t age;
struct master *master;
pthread_rwlock_t source_lock;