Blame SOURCES/autofs-5.0.8-fix-negative-status-being-reset-on-map-read.patch

306fa1
autofs-5.0.8 - fix negative status being reset on map read
306fa1
306fa1
From: Ian Kent <raven@themaw.net>
306fa1
306fa1
The map entry status field, which holds the negative cache timeout,
306fa1
gets reset on a map re-read.
306fa1
306fa1
If the negative map entry was added at the same time as the map
306fa1
read and it was for an entry that was never in the map, the
306fa1
status gets reset even though the entry is still a valid
306fa1
negative entry.
306fa1
306fa1
Consequently lookups for non-existent map entries are never
306fa1
seen as negative and the lookup always continues.
306fa1
---
306fa1
 CHANGELOG       |    1 +
306fa1
 daemon/lookup.c |    3 ++-
306fa1
 2 files changed, 3 insertions(+), 1 deletion(-)
306fa1
306fa1
--- autofs-5.0.7.orig/CHANGELOG
306fa1
+++ autofs-5.0.7/CHANGELOG
306fa1
@@ -70,6 +70,7 @@
306fa1
 - get_nfs_info() should query portmapper if port is not given.
306fa1
 - fix rpc_portmap_getport() proto not set.
306fa1
 - fix protmap not trying proto v2.
306fa1
+- fix negative status being reset on map read.
306fa1
 
306fa1
 25/07/2012 autofs-5.0.7
306fa1
 =======================
306fa1
--- autofs-5.0.7.orig/daemon/lookup.c
306fa1
+++ autofs-5.0.7/daemon/lookup.c
306fa1
@@ -1042,7 +1042,8 @@ void lookup_prune_one_cache(struct autof
306fa1
 			 * Reset time of last fail for valid map entries to
306fa1
 			 * force entry update and subsequent mount retry.
306fa1
 			 */
306fa1
-			me->status = 0;
306fa1
+			if (me->mapent)
306fa1
+				me->status = 0;
306fa1
 			me = cache_enumerate(mc, me);
306fa1
 			continue;
306fa1
 		}