summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorTed Unangst <tedu@cvs.openbsd.org>2004-01-25 20:02:53 +0000
committerTed Unangst <tedu@cvs.openbsd.org>2004-01-25 20:02:53 +0000
commitc48b81340c8aec1888b968768615dd79f78efbfc (patch)
tree505f19dd55a4b6b76c4376b5c8c354dc5cddda1a /sys
parentc7aba660e89f08c8c169911dce201bc3c525e6c8 (diff)
vref device vnodes early, so we don't get mismatched vrele calls.
problem found, fix tested naddy@
Diffstat (limited to 'sys')
-rw-r--r--sys/ufs/ffs/ffs_vfsops.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/sys/ufs/ffs/ffs_vfsops.c b/sys/ufs/ffs/ffs_vfsops.c
index 1ff8d709a56..ff8010e7f96 100644
--- a/sys/ufs/ffs/ffs_vfsops.c
+++ b/sys/ufs/ffs/ffs_vfsops.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ffs_vfsops.c,v 1.63 2004/01/20 03:44:06 tedu Exp $ */
+/* $OpenBSD: ffs_vfsops.c,v 1.64 2004/01/25 20:02:52 tedu Exp $ */
/* $NetBSD: ffs_vfsops.c,v 1.19 1996/02/09 22:22:26 christos Exp $ */
/*
@@ -1168,6 +1168,7 @@ retry:
bzero((caddr_t)ip, sizeof(struct inode));
lockinit(&ip->i_lock, PINOD, "inode", 0, 0);
ip->i_ump = ump;
+ VREF(ip->i_devvp);
vp->v_data = ip;
ip->i_vnode = vp;
ip->i_fs = fs = ump->um_fs;
@@ -1230,10 +1231,6 @@ retry:
return (error);
}
/*
- * Finish inode initialization now that aliasing has been resolved.
- */
- VREF(ip->i_devvp);
- /*
* Set up a generation number for this inode if it does not
* already have one. This should only happen on old filesystems.
*/