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

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