autofs/autofs-5.0.5-fix-prune-cache-valid-check.patch
Ian Kent e767d529b8 * Thu Mar 03 2011 Ian Kent <ikent@redhat.com> - 1:5.0.5-36
- use weight only for server selection.
- fix isspace() wild card substition.
- auto adjust ldap page size.
- fix prune cache valid check.
- fix mountd vers retry.
- fix expire race.
- add lsb force-reload and try-restart.
2011-03-03 10:58:56 +08:00

43 lines
1.2 KiB
Diff

autofs-5.0.5 - fix prune cache valid check
From: Ian Kent <raven@themaw.net>
During a map reload, when pruning the cache we look for a valid map entry
in another map. In lookup_prune_one_cache() There is a missing check for
the entry being in the current map which causes the directory cleanup code
from doing its job.
---
CHANGELOG | 1 +
daemon/lookup.c | 8 ++++++++
2 files changed, 9 insertions(+)
--- autofs-5.0.5.orig/CHANGELOG
+++ autofs-5.0.5/CHANGELOG
@@ -57,6 +57,7 @@
- use weight only for server selection.
- fix isspace() wild card substition.
- auto adjust ldap page size.
+- fix prune cache valid check.
03/09/2009 autofs-5.0.5
-----------------------
--- autofs-5.0.5.orig/daemon/lookup.c
+++ autofs-5.0.5/daemon/lookup.c
@@ -1060,6 +1060,14 @@ void lookup_prune_one_cache(struct autof
* cache entry.
*/
valid = lookup_source_valid_mapent(ap, key, LKP_DISTINCT);
+ if (valid && valid->mc == mc) {
+ /*
+ * We've found a map entry that has been removed from
+ * the current cache so it isn't really valid.
+ */
+ cache_unlock(valid->mc);
+ valid = NULL;
+ }
if (!valid &&
is_mounted(_PATH_MOUNTED, path, MNTS_REAL)) {
debug(ap->logopt,