<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">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-&gt;fs_type, "autofs")) {
 			struct stat st;
+			struct statfs fs;
 			int ioctlfd;
 
 			cache_unlock(me-&gt;mc);
@@ -950,7 +951,14 @@ void *expire_proc_direct(void *arg)
 				continue;
 			}
 
-			if (tree_is_mounted(mnts, next-&gt;path, MNTS_REAL)) {
+			if (statfs(next-&gt;path, &amp;fs) == -1) {
+				pthread_setcancelstate(cur_state, NULL);
+				warn(ap-&gt;logopt,
+				    "fstatfs failed for %s", next-&gt;path);
+				continue;
+			}
+
+			if (fs.f_type != AUTOFS_SUPER_MAGIC) {
 				pthread_setcancelstate(cur_state, NULL);
 				continue;
 			}
</pre></body></html>