Sophie

Sophie

distrib > Scientific%20Linux > 5x > x86_64 > by-pkgid > 130701790bf2d95e902edf16031ff596 > files > 203

autofs-5.0.1-0.rc2.164.el5_8.src.rpm

autofs-5.0.1 - 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.
---

 daemon/lookup.c |    5 +++++
 1 file changed, 5 insertions(+)


--- autofs-5.0.1.orig/daemon/lookup.c
+++ autofs-5.0.1/daemon/lookup.c
@@ -1021,6 +1021,11 @@ void lookup_prune_one_cache(struct autof
 		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;
 		}