Blame SOURCES/autofs-5.1.7-pass-mapent_cache-to-update_offset_entry.patch

49b67f
autofs-5.1.7 - pass mapent_cache to update_offset_entry()
49b67f
49b67f
From: Ian Kent <raven@themaw.net>
49b67f
49b67f
Pass mapent_cache to update_offset_entry() rather than use the wait/signal
49b67f
mechanism, it isn't needed here.
49b67f
49b67f
Signed-off-by: Ian Kent <raven@themaw.net>
49b67f
---
49b67f
 CHANGELOG           |    1 +
49b67f
 modules/parse_sun.c |   22 ++++++----------------
49b67f
 2 files changed, 7 insertions(+), 16 deletions(-)
49b67f
49b67f
--- autofs-5.1.4.orig/CHANGELOG
49b67f
+++ autofs-5.1.4/CHANGELOG
49b67f
@@ -16,6 +16,7 @@
49b67f
 - fix mnts_get_expire_list() expire list construction.
49b67f
 - fix inconsistent locking in umount_subtree_mounts().
49b67f
 - fix return from umount_subtree_mounts() on offset list delete.
49b67f
+- pass mapent_cache to update_offset_entry().
49b67f
 
49b67f
 xx/xx/2018 autofs-5.1.5
49b67f
 - fix flag file permission.
49b67f
--- autofs-5.1.4.orig/modules/parse_sun.c
49b67f
+++ autofs-5.1.4/modules/parse_sun.c
49b67f
@@ -795,24 +795,17 @@ static int check_is_multi(const char *ma
49b67f
 }
49b67f
 
49b67f
 static int
49b67f
-update_offset_entry(struct autofs_point *ap, const char *name,
49b67f
+update_offset_entry(struct autofs_point *ap,
49b67f
+		    struct mapent_cache *mc, const char *name,
49b67f
 		    const char *m_root, int m_root_len,
49b67f
-		    const char *path, const char *myoptions, const char *loc,
49b67f
-		    time_t age)
49b67f
+		    const char *path, const char *myoptions,
49b67f
+		    const char *loc, time_t age)
49b67f
 {
49b67f
-	struct map_source *source;
49b67f
-	struct mapent_cache *mc;
49b67f
 	char m_key[PATH_MAX + 1];
49b67f
 	char m_mapent[MAPENT_MAX_LEN + 1];
49b67f
 	int p_len, m_key_len, m_options_len, m_mapent_len;
49b67f
 	int ret;
49b67f
 
49b67f
-	source = ap->entry->current;
49b67f
-	ap->entry->current = NULL;
49b67f
-	master_source_current_signal(ap->entry);
49b67f
-
49b67f
-	mc = source->mc;
49b67f
-
49b67f
 	memset(m_mapent, 0, MAPENT_MAX_LEN + 1);
49b67f
 
49b67f
 	/* Internal hosts map may have loc == NULL */
49b67f
@@ -1576,11 +1569,8 @@ dont_expand:
49b67f
 			p += l;
49b67f
 			p = skipspace(p);
49b67f
 
49b67f
-			master_source_current_wait(ap->entry);
49b67f
-			ap->entry->current = source;
49b67f
-
49b67f
-			status = update_offset_entry(ap, name,
49b67f
-						     m_root, m_root_len,
49b67f
+			status = update_offset_entry(ap, mc,
49b67f
+						     name, m_root, m_root_len,
49b67f
 						     path, myoptions, loc, age);
49b67f
 
49b67f
 			if (status != CHE_OK) {