From: zoulasc Date: Fri, 21 Mar 2014 00:29:18 +0000 (-0400) Subject: From: Ian Kent X-Git-Url: https://git.fsl.cs.stonybrook.edu/?a=commitdiff_plain;h=6002e42eee95f2beb48061d7da81092685348c6a;p=am-utils-6.2.git 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. --- 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 {