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

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