From b9e492d713a822495fb1d2313e56ccf226296f03 Mon Sep 17 00:00:00 2001 From: Packit Service Date: Apr 16 2021 22:13:56 +0000 Subject: Apply patch autofs-5.1.6-dont-prune-offset-map-entries.patch patch_name: autofs-5.1.6-dont-prune-offset-map-entries.patch present_in_specfile: true --- diff --git a/CHANGELOG b/CHANGELOG index 3608345..34b160e 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -109,6 +109,7 @@ xx/xx/2018 autofs-5.1.5 - refactor sss getautomntbyname(). - improve sss getautomntbyname() error handling. - use a valid timeout in lookup_prune_one_cache(). +- dont prune offset map entries. 19/12/2017 autofs-5.1.4 - fix spec file url. diff --git a/daemon/lookup.c b/daemon/lookup.c index 8bf1335..2de622e 100644 --- a/daemon/lookup.c +++ b/daemon/lookup.c @@ -1355,6 +1355,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.