diff --git a/CHANGELOG b/CHANGELOG index 24dbe19..cd5b242 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -22,6 +22,7 @@ - alter expire locking of multi-mounts to lock sub-tree instead of entire tree. - review verbose message feedback and update. +- correction for expire of multi-mounts. 13/7/2006 autofs-5.0.1 rc1 -------------------------- diff --git a/daemon/automount.c b/daemon/automount.c index 5e2b4c3..cc6e9e0 100644 --- a/daemon/automount.c +++ b/daemon/automount.c @@ -375,6 +375,7 @@ int umount_multi(struct autofs_point *ap struct statfs fs; int is_autofs_fs; int ret, left; + unsigned int is_mm_root; debug(ap->logopt, "path %s incl %d", path, incl); @@ -404,6 +405,7 @@ int umount_multi(struct autofs_point *ap cache_multi_lock(me->parent); mc = me->source->mc; + is_mm_root = (me->multi == me); left = 0; @@ -414,7 +416,7 @@ int umount_multi(struct autofs_point *ap if (ap->submount) oap = ap->parent; - if (me == me->multi && !strchr(me->key, '/')) { + if (is_mm_root && !strchr(me->key, '/')) { /* Indirect multi-mount root */ root = alloca(strlen(ap->path) + strlen(me->key) + 2); strcpy(root, ap->path); @@ -443,7 +445,7 @@ int umount_multi(struct autofs_point *ap * If this is the root of a multi-mount we've had to umount * it already to ensure it's ok to remove any offset triggers */ - if (me != me->multi) { + if (!is_mm_root) { msg("unmounting dir = %s", path); if (umount_ent(ap, path)) { diff --git a/lib/parse_subs.c b/lib/parse_subs.c index 77651cf..68bdf8d 100644 --- a/lib/parse_subs.c +++ b/lib/parse_subs.c @@ -462,7 +462,7 @@ cont: * delete the offsets from the cache and we need to put * the offset triggers back. */ - if (is_mounted(_PATH_MOUNTED, path, MNTS_REAL)) { + if (is_mounted(_PATH_MOUNTED, root, MNTS_REAL)) { msg("unmounting dir = %s", root); if (umount_ent(ap, root)) { if (!mount_multi_triggers(ap, root, me, "/"))