diff options
author | David Greenman <dg@FreeBSD.org> | 1995-02-27 06:50:08 +0000 |
---|---|---|
committer | David Greenman <dg@FreeBSD.org> | 1995-02-27 06:50:08 +0000 |
commit | f9ceb7c7b5dcad26a6ba4a2e1b7df01791349c02 (patch) | |
tree | 6b035f8c484be01c384f09b14eafc50ee503645f /sys/kern/vfs_export.c | |
parent | 9ddf48f0d2349e92d30ce83d5fe2849bf10d4103 (diff) | |
download | src-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.c | 5 |
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); |