autofs-5.1.6 - dont prune offset map entries From: Ian Kent Indirect maps create offset map entries for multi-mount map entries on deamnd and remove them when they expire. Since they are created based on an owning map entry they don't correspond to an actual map entry so they, and their owning map entry, should never be pruned. Signed-off-by: Ian Kent --- CHANGELOG | 1 + daemon/lookup.c | 9 +++++++++ 2 files changed, 10 insertions(+) diff --git a/CHANGELOG b/CHANGELOG index 0779752d..e74f1fa7 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -37,6 +37,7 @@ xx/xx/2020 autofs-5.1.7 - refactor sss getautomntbyname(). - improve sss getautomntbyname() error handling. - use a valid timeout in lookup_prune_one_cache(). +- dont prune offset map entries. 07/10/2019 autofs-5.1.6 - support strictexpire mount option. diff --git a/daemon/lookup.c b/daemon/lookup.c index 05863307..db00cb4a 100644 --- a/daemon/lookup.c +++ b/daemon/lookup.c @@ -1347,6 +1347,15 @@ void lookup_prune_one_cache(struct autofs_point *ap, struct mapent_cache *mc, ti } if (ap->type == LKP_INDIRECT) { + /* Don't prune offset map entries since they are + * created on demand and managed by expire and don't + * prune the multi-map owner map entry. + */ + if (*me->key == '/' || me->multi == me) { + me = cache_enumerate(mc, me); + continue; + } + /* If the map hasn't been read (nobrowse * indirect mounts) then keep cached entries * for POSITIVE_TIMEOUT.