diff --git a/CHANGELOG b/CHANGELOG index 011da35..8ca790a 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -3,6 +3,7 @@ - fix typo in Fix typo in var when removing temp directory. - remove redundant rpath link option. - ignore "winbind" if it appears in "automount" nsswitch.conf. +- fix another expire regression introduced in the "mitigate manual umount" patch. 4/1/2007 autofs-5.0.1 rc3 ------------------------- diff --git a/daemon/direct.c b/daemon/direct.c index 070e614..aa1a501 100644 --- a/daemon/direct.c +++ b/daemon/direct.c @@ -930,6 +930,7 @@ void *expire_proc_direct(void *arg) if (!strcmp(next->fs_type, "autofs")) { struct stat st; + struct statfs fs; int ioctlfd; cache_unlock(me->mc); @@ -950,7 +951,14 @@ void *expire_proc_direct(void *arg) continue; } - if (tree_is_mounted(mnts, next->path, MNTS_REAL)) { + if (statfs(next->path, &fs) == -1) { + pthread_setcancelstate(cur_state, NULL); + warn(ap->logopt, + "fstatfs failed for %s", next->path); + continue; + } + + if (fs.f_type != AUTOFS_SUPER_MAGIC) { pthread_setcancelstate(cur_state, NULL); continue; }