summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorpooka <pooka@NetBSD.org>2007-08-06 17:09:11 +0000
committerpooka <pooka@NetBSD.org>2007-08-06 17:09:11 +0000
commit3fbf89c64896753b58bc8979efea89eb81fc77dd (patch)
tree5b7880bdfbc1a90c233428667b204f6ca2d879a0
parent544155dcc30cb15ecf46344935bbcd9b50059942 (diff)
Initialize size of outsize-of-fs device vnodes also, since they
can migrate to file systems due to checkalias() and cause KASSERT panics. fixes nfsroot panic reported by martin
-rw-r--r--sys/kern/vfs_subr.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/sys/kern/vfs_subr.c b/sys/kern/vfs_subr.c
index 8768a5ffb37..700e68f95b4 100644
--- a/sys/kern/vfs_subr.c
+++ b/sys/kern/vfs_subr.c
@@ -1,4 +1,4 @@
-/* $NetBSD: vfs_subr.c,v 1.296 2007/07/29 14:44:08 pooka Exp $ */
+/* $NetBSD: vfs_subr.c,v 1.297 2007/08/06 17:09:11 pooka Exp $ */
/*-
* Copyright (c) 1997, 1998, 2004, 2005 The NetBSD Foundation, Inc.
@@ -84,7 +84,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: vfs_subr.c,v 1.296 2007/07/29 14:44:08 pooka Exp $");
+__KERNEL_RCSID(0, "$NetBSD: vfs_subr.c,v 1.297 2007/08/06 17:09:11 pooka Exp $");
#include "opt_inet.h"
#include "opt_ddb.h"
@@ -927,6 +927,7 @@ getdevvp(dev_t dev, struct vnode **vpp, enum vtype type)
}
vp = nvp;
vp->v_type = type;
+ uvm_vnp_setsize(vp, 0);
if ((nvp = checkalias(vp, dev, NULL)) != 0) {
vput(vp);
vp = nvp;