aboutsummaryrefslogtreecommitdiffstats
path: root/modules
diff options
context:
space:
mode:
authorIan Kent <raven@themaw.net>2021-02-12 10:01:34 +0800
committerIan Kent <raven@themaw.net>2021-03-15 07:30:34 +0800
commitcda6b45c5e12db1a6abdd41e72ba8580d4904910 (patch)
tree03bffb4cb91269baf20ee2d78d10240fce37d16a /modules
parent55246ce5437c302e80aa21fa06f2216bd0856a6f (diff)
downloadautofs-cda6b45c5e12db1a6abdd41e72ba8580d4904910.tar.gz
autofs-5.1.7 - eliminate clean_stale_multi_triggers()
Eliminate clean_stale_multi_triggers() by checking for stale offsets at the time mount_subtree() is called. This should result in the same behaviour but eliminate an additional seperate traversal of the offset list. Signed-off-by: Ian Kent <raven@themaw.net>
Diffstat (limited to 'modules')
-rw-r--r--modules/parse_sun.c10
1 files changed, 1 insertions, 9 deletions
diff --git a/modules/parse_sun.c b/modules/parse_sun.c
index f42af7b7..f4d5125c 100644
--- a/modules/parse_sun.c
+++ b/modules/parse_sun.c
@@ -1176,7 +1176,7 @@ static int mount_subtree(struct autofs_point *ap, struct mapent *me,
/* Mount root offset if it exists */
ro = cache_lookup_distinct(me->mc, key);
- if (ro) {
+ if (ro && ro->age == me->multi->age) {
char *myoptions, *ro_loc;
int namelen = name ? strlen(name) : 0;
int ro_len;
@@ -1610,14 +1610,6 @@ dont_expand:
free(myoptions);
} while (*p == '/' || (*p == '"' && *(p + 1) == '/'));
- /*
- * We've got the ordered list of multi-mount entries so go
- * through and remove any stale entries if this is the top
- * of the multi-mount and set the parent entry of each.
- */
- if (me == me->multi)
- clean_stale_multi_triggers(ap, me, NULL, NULL);
-
rv = mount_subtree(ap, me, name, NULL, options, ctxt);
cache_multi_unlock(me);