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

304803
autofs-5.0.9 - fix fix negative status being reset on map read
304803
304803
From: Ian Kent <ikent@redhat.com>
304803
304803
The original patch to fix the negative status being reset on map
304803
read caused a regression for the case where a negative entry was
304803
created as a result of a lookup matching the wildcard entry.
304803
304803
It isn't possible to eliminate the key not found in map messages
304803
on map read for this case because there's no way of knowing if
304803
a map change would have fixed the original problem so the negative
304803
entry status must be reset and the mount retried on each map read.
304803
---
304803
 CHANGELOG       |    1 +
304803
 daemon/lookup.c |    5 ++++-
304803
 2 files changed, 5 insertions(+), 1 deletion(-)
304803
304803
--- autofs-5.0.7.orig/CHANGELOG
304803
+++ autofs-5.0.7/CHANGELOG
304803
@@ -71,6 +71,7 @@
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
+- fix 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
@@ -1041,8 +1041,11 @@ void lookup_prune_one_cache(struct autof
304803
 			/*
304803
 			 * Reset time of last fail for valid map entries to
304803
 			 * force entry update and subsequent mount retry.
304803
+			 * A map entry that's still invalid after a read
304803
+			 * may have been created by a failed wildcard lookup
304803
+			 * so reset the status on those too.
304803
 			 */
304803
-			if (me->mapent)
304803
+			if (me->mapent || cache_lookup(mc, "*"))
304803
 				me->status = 0;
304803
 			me = cache_enumerate(mc, me);
304803
 			continue;