Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 3 Nov 2016 14:36:57 +0000 (UTC)
From:      Edward Tomasz Napierala <trasz@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org
Subject:   svn commit: r308252 - stable/11/sys/kern
Message-ID:  <201611031436.uA3EavHT008328@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: trasz
Date: Thu Nov  3 14:36:57 2016
New Revision: 308252
URL: https://svnweb.freebsd.org/changeset/base/308252

Log:
  MFC r306071:
  
  Fix bug introduced with r302388, which could cause processes accessing
  automounted shares to hang with "vfs_busy" wchan.
  
  (As a workaround one can run 'automount -u' from cron.)

Modified:
  stable/11/sys/kern/vfs_mount.c
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/sys/kern/vfs_mount.c
==============================================================================
--- stable/11/sys/kern/vfs_mount.c	Thu Nov  3 13:06:17 2016	(r308251)
+++ stable/11/sys/kern/vfs_mount.c	Thu Nov  3 14:36:57 2016	(r308252)
@@ -1207,6 +1207,9 @@ sys_unmount(struct thread *td, struct un
 /*
  * Return error if any of the vnodes, ignoring the root vnode
  * and the syncer vnode, have non-zero usecount.
+ *
+ * This function is purely advisory - it can return false positives
+ * and negatives.
  */
 static int
 vfs_check_usecounts(struct mount *mp)
@@ -1288,6 +1291,10 @@ dounmount(struct mount *mp, int flags, s
 		MNT_ILOCK(mp);
 		if (error != 0) {
 			mp->mnt_kern_flag &= ~(MNTK_UNMOUNT | MNTK_NOINSMNTQ);
+			if (mp->mnt_kern_flag & MNTK_MWAIT) {
+				mp->mnt_kern_flag &= ~MNTK_MWAIT;
+				wakeup(mp);
+			}
 			MNT_IUNLOCK(mp);
 			if (coveredvp != NULL) {
 				VOP_UNLOCK(coveredvp, 0);



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201611031436.uA3EavHT008328>