Ian Kent cc58c1
autofs-5.0.6 - remove cache update from parse_mount()
Ian Kent cc58c1
Ian Kent cc58c1
From: Ian Kent <ikent@redhat.com>
Ian Kent cc58c1
Ian Kent cc58c1
I'm not sure why I added this update in the parse sun module.
Ian Kent cc58c1
Ian Kent cc58c1
The lookup modules have the job of updating the map entry cache and
Ian Kent cc58c1
I can't see why an entry would be missing since the parse function
Ian Kent cc58c1
is called following the entry lookup (which does the update).
Ian Kent cc58c1
---
Ian Kent cc58c1
Ian Kent cc58c1
 modules/parse_sun.c |   23 -----------------------
Ian Kent cc58c1
 1 file changed, 23 deletions(-)
Ian Kent cc58c1
Ian Kent cc58c1
Ian Kent cc58c1
--- autofs-5.0.6.orig/modules/parse_sun.c
Ian Kent cc58c1
+++ autofs-5.0.6/modules/parse_sun.c
Ian Kent cc58c1
@@ -1383,29 +1383,6 @@ int parse_mount(struct autofs_point *ap,
Ian Kent cc58c1
 			strcat(m_root, name);
Ian Kent cc58c1
 		}
Ian Kent cc58c1
 
Ian Kent cc58c1
-		/*
Ian Kent cc58c1
-		 * Can't take the write lock for direct mount entries here
Ian Kent cc58c1
-		 * but they should always be present in the map entry cache.
Ian Kent cc58c1
-		 */
Ian Kent cc58c1
-		if (ap->type == LKP_INDIRECT) {
Ian Kent cc58c1
-			cache_writelock(mc);
Ian Kent cc58c1
-			me = cache_lookup_distinct(mc, name);
Ian Kent cc58c1
-			if (!me) {
Ian Kent cc58c1
-				int ret;
Ian Kent cc58c1
-				/*
Ian Kent cc58c1
-				 * Not in the cache, perhaps it's a program map
Ian Kent cc58c1
-				 * or one that doesn't support enumeration.
Ian Kent cc58c1
-				 */
Ian Kent cc58c1
-				ret = cache_add(mc, source, name, mapent, age);
Ian Kent cc58c1
-				if (ret == CHE_FAIL) {
Ian Kent cc58c1
-					cache_unlock(mc);
Ian Kent cc58c1
-					free(options);
Ian Kent cc58c1
-					return 1;
Ian Kent cc58c1
-				}
Ian Kent cc58c1
-			}
Ian Kent cc58c1
-			cache_unlock(mc);
Ian Kent cc58c1
-		}
Ian Kent cc58c1
-
Ian Kent cc58c1
 		cache_readlock(mc);
Ian Kent cc58c1
 		me = cache_lookup_distinct(mc, name);
Ian Kent cc58c1
 		if (me) {