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

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