svn commit: r229978 - stable/8/sys/kern

Kirk McKusick mckusick at FreeBSD.org
Wed Jan 11 19:12:30 UTC 2012


Author: mckusick
Date: Wed Jan 11 19:12:29 2012
New Revision: 229978
URL: http://svn.freebsd.org/changeset/base/229978

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
  PR:          kern/161016

Modified:
  stable/8/sys/kern/vfs_mount.c
Directory Properties:
  stable/8/sys/   (props changed)
  stable/8/sys/amd64/include/xen/   (props changed)
  stable/8/sys/cddl/contrib/opensolaris/   (props changed)
  stable/8/sys/contrib/dev/acpica/   (props changed)
  stable/8/sys/contrib/pf/   (props changed)

Modified: stable/8/sys/kern/vfs_mount.c
==============================================================================
--- stable/8/sys/kern/vfs_mount.c	Wed Jan 11 18:38:52 2012	(r229977)
+++ stable/8/sys/kern/vfs_mount.c	Wed Jan 11 19:12:29 2012	(r229978)
@@ -1260,18 +1260,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);


More information about the svn-src-stable-8 mailing list