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

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