From 6002e42eee95f2beb48061d7da81092685348c6a Mon Sep 17 00:00:00 2001 From: zoulasc Date: Thu, 20 Mar 2014 20:29:18 -0400 Subject: [PATCH] From: Ian Kent An ENOENT return from umount(2) means the kernel path walk couldn't resolve the path of the mount to a dentry. In that case there can't be an autofs waitq entry waiting for notification, since there's no dentry, so don't even try to notify the kernel. --- amd/map.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/amd/map.c b/amd/map.c index 8e86b39a..e6d14b8c 100644 --- a/amd/map.c +++ b/amd/map.c @@ -873,10 +873,12 @@ free_map_if_success(int rc, int term, opaque_t arg) else plog(XLOG_ERROR, "%s: unmount: %s", mp->am_path, strerror(rc)); #ifdef HAVE_FS_AUTOFS - if (mf->mf_flags & MFF_IS_AUTOFS) - autofs_get_mp(mp); - if (mp->am_flags & AMF_AUTOFS) - autofs_umount_failed(mp); + if (rc != ENOENT) { + if (mf->mf_flags & MFF_IS_AUTOFS) + autofs_get_mp(mp); + if (mp->am_flags & AMF_AUTOFS) + autofs_umount_failed(mp); + } #endif /* HAVE_FS_AUTOFS */ amd_stats.d_uerr++; } else { -- 2.34.1