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

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