[Midnightbsd-cvs] src [9027] trunk/sys/kern/vfs_mount.c: move the vn_start_write call in the dounmount before setting the MNTK_UNMOUNT flag.
laffer1 at midnightbsd.org
laffer1 at midnightbsd.org
Sat Oct 1 05:44:07 EDT 2016
Revision: 9027
http://svnweb.midnightbsd.org/src/?rev=9027
Author: laffer1
Date: 2016-10-01 05:44:07 -0400 (Sat, 01 Oct 2016)
Log Message:
-----------
move the vn_start_write call in the dounmount before setting the MNTK_UNMOUNT flag.
Modified Paths:
--------------
trunk/sys/kern/vfs_mount.c
Modified: trunk/sys/kern/vfs_mount.c
===================================================================
--- trunk/sys/kern/vfs_mount.c 2016-10-01 09:42:16 UTC (rev 9026)
+++ trunk/sys/kern/vfs_mount.c 2016-10-01 09:44:07 UTC (rev 9027)
@@ -1260,6 +1260,7 @@
return (error);
}
+ vn_start_write(NULL, &mp, V_WAIT);
MNT_ILOCK(mp);
if ((mp->mnt_kern_flag & MNTK_UNMOUNT) != 0 ||
!TAILQ_EMPTY(&mp->mnt_uppers)) {
@@ -1266,6 +1267,7 @@
MNT_IUNLOCK(mp);
if (coveredvp)
VOP_UNLOCK(coveredvp, 0);
+ vn_finished_write(mp);
return (EBUSY);
}
mp->mnt_kern_flag |= MNTK_UNMOUNT | MNTK_NOINSMNTQ;
@@ -1285,7 +1287,6 @@
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 Midnightbsd-cvs
mailing list