autofs-5.0.5 - reset negative status on cache prune

From: Ian Kent <raven@themaw.net>

When we prune the cache we should reset time of last fail for valid map
entries so that, on a HUP signal, we force an entry update on next mount
attempt.
---

 CHANGELOG       |    1 +
 daemon/lookup.c |    5 +++++
 2 files changed, 6 insertions(+), 0 deletions(-)


diff --git a/CHANGELOG b/CHANGELOG
index 8b12bbe..d7d8512 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -70,6 +70,7 @@
 - fix out of order locking in readmap.
 - include ip address in debug logging.
 - mount using address for DNS round robin host names.
+- reset negative status on cache prune.
 
 03/09/2009 autofs-5.0.5
 -----------------------
diff --git a/daemon/lookup.c b/daemon/lookup.c
index 0f7051b..958d8cc 100644
--- a/daemon/lookup.c
+++ b/daemon/lookup.c
@@ -1034,6 +1034,11 @@ void lookup_prune_one_cache(struct autofs_point *ap, struct mapent_cache *mc, ti
 		char *key = NULL, *next_key = NULL;
 
 		if (me->age >= age) {
+			/*
+			 * Reset time of last fail for valid map entries to
+			 * force entry update and subsequent mount retry.
+			 */
+			me->status = 0;
 			me = cache_enumerate(mc, me);
 			continue;
 		}