aboutsummaryrefslogtreecommitdiff
path: root/sys/kern/vfs_export.c
diff options
context:
space:
mode:
authorDavid Greenman <dg@FreeBSD.org>1995-02-27 06:50:08 +0000
committerDavid Greenman <dg@FreeBSD.org>1995-02-27 06:50:08 +0000
commitf9ceb7c7b5dcad26a6ba4a2e1b7df01791349c02 (patch)
tree6b035f8c484be01c384f09b14eafc50ee503645f /sys/kern/vfs_export.c
parent9ddf48f0d2349e92d30ce83d5fe2849bf10d4103 (diff)
downloadsrc-f9ceb7c7b5dcad26a6ba4a2e1b7df01791349c02.tar.gz
src-f9ceb7c7b5dcad26a6ba4a2e1b7df01791349c02.zip
Initialize v_rdev in getnewvnode() - it appears that some filesystems
may not properly initialize this field in all cases, and this would result in very anti-social behavior (overwriting on some other random device/location). Submitted by: John Dyson
Notes
Notes: svn path=/head/; revision=6758
Diffstat (limited to 'sys/kern/vfs_export.c')
-rw-r--r--sys/kern/vfs_export.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/sys/kern/vfs_export.c b/sys/kern/vfs_export.c
index b1da08036a65..7962a6a86d0d 100644
--- a/sys/kern/vfs_export.c
+++ b/sys/kern/vfs_export.c
@@ -36,7 +36,7 @@
* SUCH DAMAGE.
*
* @(#)vfs_subr.c 8.13 (Berkeley) 4/18/94
- * $Id: vfs_subr.c,v 1.15 1995/01/10 07:32:36 davidg Exp $
+ * $Id: vfs_subr.c,v 1.16 1995/02/22 09:39:22 davidg Exp $
*/
/*
@@ -370,8 +370,9 @@ getnewvnode(tag, mp, vops, vpp)
vp->v_socket = 0;
vp->v_writecount = 0; /* XXX */
}
- vp->v_type = VNON;
cache_purge(vp);
+ vp->v_type = VNON;
+ vp->v_rdev = NODEV;
vp->v_tag = tag;
vp->v_op = vops;
insmntque(vp, mp);