svn commit: r226622 - stable/9/sys/kern
Kirk McKusick
mckusick at FreeBSD.org
Fri Oct 21 22:12:25 UTC 2011
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);
More information about the svn-src-stable-9
mailing list