Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 21 Oct 2011 22:12:25 +0000 (UTC)
From:      Kirk McKusick <mckusick@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org
Subject:   svn commit: r226622 - stable/9/sys/kern
Message-ID:  <201110212212.p9LMCPDl043554@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: mckusick
Date: Fri Oct 21 22:12:24 2011
New Revision: 226622
URL: http://svn.freebsd.org/changeset/base/226622

Log:
  MFC: 226265
  
  When unmounting a filesystem always wait for the vfs_busy lock to clear
  so that if no vnodes in the filesystem are actively in use the unmount
  will succeed rather than failing with EBUSY.
  
  Reported by: Garrett Cooper
  Reviewed by: Attilio Rao and Kostik Belousov
  Tested by:   Garrett Cooper
  Approved by: re (kib)
  PR:          kern/161016

Modified:
  stable/9/sys/kern/vfs_mount.c

Modified: stable/9/sys/kern/vfs_mount.c
==============================================================================
--- stable/9/sys/kern/vfs_mount.c	Fri Oct 21 22:07:52 2011	(r226621)
+++ stable/9/sys/kern/vfs_mount.c	Fri Oct 21 22:12:24 2011	(r226622)
@@ -1227,18 +1227,6 @@ dounmount(mp, flags, td)
 		mp->mnt_kern_flag |= MNTK_UNMOUNTF;
 	error = 0;
 	if (mp->mnt_lockref) {
-		if ((flags & MNT_FORCE) == 0) {
-			mp->mnt_kern_flag &= ~(MNTK_UNMOUNT | MNTK_NOINSMNTQ |
-			    MNTK_UNMOUNTF);
-			if (mp->mnt_kern_flag & MNTK_MWAIT) {
-				mp->mnt_kern_flag &= ~MNTK_MWAIT;
-				wakeup(mp);
-			}
-			MNT_IUNLOCK(mp);
-			if (coveredvp)
-				VOP_UNLOCK(coveredvp, 0);
-			return (EBUSY);
-		}
 		mp->mnt_kern_flag |= MNTK_DRAINING;
 		error = msleep(&mp->mnt_lockref, MNT_MTX(mp), PVFS,
 		    "mount drain", 0);



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