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

Konstantin Belousov kib at FreeBSD.org
Wed Apr 3 15:57:18 UTC 2013


Author: kib
Date: Wed Apr  3 15:57:18 2013
New Revision: 249055
URL: http://svnweb.freebsd.org/changeset/base/249055

Log:
  MFC r248562:
  Move the vn_start_write() call in the dounmount() before setting the
  MNTK_UNMOUNT flag.

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

Modified: stable/8/sys/kern/vfs_mount.c
==============================================================================
--- stable/8/sys/kern/vfs_mount.c	Wed Apr  3 15:38:44 2013	(r249054)
+++ stable/8/sys/kern/vfs_mount.c	Wed Apr  3 15:57:18 2013	(r249055)
@@ -1247,11 +1247,13 @@ dounmount(mp, flags, td)
 		return (error);
 	}
 
+	vn_start_write(NULL, &mp, V_WAIT);
 	MNT_ILOCK(mp);
 	if (mp->mnt_kern_flag & MNTK_UNMOUNT) {
 		MNT_IUNLOCK(mp);
 		if (coveredvp)
 			VOP_UNLOCK(coveredvp, 0);
+		vn_finished_write(mp);
 		return (EBUSY);
 	}
 	mp->mnt_kern_flag |= MNTK_UNMOUNT | MNTK_NOINSMNTQ;
@@ -1271,7 +1273,6 @@ dounmount(mp, flags, td)
 	KASSERT(error == 0,
 	    ("%s: invalid return value for msleep in the drain path @ %s:%d",
 	    __func__, __FILE__, __LINE__));
-	vn_start_write(NULL, &mp, V_WAIT);
 
 	if (mp->mnt_flag & MNT_EXPUBLIC)
 		vfs_setpublicfs(NULL, NULL, NULL);


More information about the svn-src-all mailing list