Module Name: src
Committed By: martin
Date: Tue Dec 24 17:45:53 UTC 2019
Modified Files:
src/sys/miscfs/nullfs [netbsd-9]: null_vfsops.c
Log Message:
Pull up following revision(s) (requested by hannken in ticket #581):
sys/miscfs/nullfs/null_vfsops.c: revision 1.96
Set IMNT_MPSAFE before creating the vnode for the root of the
filesystem. Otherwise, it won't be created with VV_MPSAFE and require
the kernel_lock.
To generate a diff of this commit:
cvs rdiff -u -r1.95 -r1.95.4.1 src/sys/miscfs/nullfs/null_vfsops.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/miscfs/nullfs/null_vfsops.c
diff -u src/sys/miscfs/nullfs/null_vfsops.c:1.95 src/sys/miscfs/nullfs/null_vfsops.c:1.95.4.1
--- src/sys/miscfs/nullfs/null_vfsops.c:1.95 Wed Feb 20 10:06:00 2019
+++ src/sys/miscfs/nullfs/null_vfsops.c Tue Dec 24 17:45:53 2019
@@ -1,4 +1,4 @@
-/* $NetBSD: null_vfsops.c,v 1.95 2019/02/20 10:06:00 hannken Exp $ */
+/* $NetBSD: null_vfsops.c,v 1.95.4.1 2019/12/24 17:45:53 martin Exp $ */
/*
* Copyright (c) 1999 National Aeronautics & Space Administration
@@ -76,7 +76,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: null_vfsops.c,v 1.95 2019/02/20 10:06:00 hannken Exp $");
+__KERNEL_RCSID(0, "$NetBSD: null_vfsops.c,v 1.95.4.1 2019/12/24 17:45:53 martin Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -140,6 +140,7 @@ nullfs_mount(struct mount *mp, const cha
/* Create the mount point. */
nmp = kmem_zalloc(sizeof(struct null_mount), KM_SLEEP);
mp->mnt_data = nmp;
+ mp->mnt_iflag |= IMNT_MPSAFE;
/*
* Make sure that the mount point is sufficiently initialized
@@ -168,7 +169,6 @@ nullfs_mount(struct mount *mp, const cha
vn_lock(vp, LK_EXCLUSIVE | LK_RETRY);
vp->v_vflag |= VV_ROOT;
nmp->nullm_rootvp = vp;
- mp->mnt_iflag |= IMNT_MPSAFE;
VOP_UNLOCK(vp);
error = set_statvfs_info(path, UIO_USERSPACE, args->la.target,