Do genfs_node_init() earlier. PR kern/36162.

This commit is contained in:
ad 2008-02-05 15:18:36 +00:00
parent 70c9f5392a
commit 648f07789f
3 changed files with 9 additions and 9 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: advfsops.c,v 1.48 2008/01/28 14:31:15 dholland Exp $ */
/* $NetBSD: advfsops.c,v 1.49 2008/02/05 15:18:36 ad Exp $ */
/*
* Copyright (c) 1994 Christian E. Hopps
@ -32,7 +32,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: advfsops.c,v 1.48 2008/01/28 14:31:15 dholland Exp $");
__KERNEL_RCSID(0, "$NetBSD: advfsops.c,v 1.49 2008/02/05 15:18:36 ad Exp $");
#if defined(_KERNEL_OPT)
#include "opt_compat_netbsd.h"
@ -391,6 +391,7 @@ adosfs_vget(mp, an, vpp)
ap->amp = amp;
ap->block = an;
ap->nwords = amp->nwords;
genfs_node_init(vp, &adosfs_genfsops);
adosfs_ainshash(amp, ap);
if ((error = bread(amp->devvp, an * amp->bsize / DEV_BSIZE,
@ -571,7 +572,6 @@ adosfs_vget(mp, an, vpp)
ap->mtime.mins = adoswordn(bp, ap->nwords - 22);
ap->mtime.ticks = adoswordn(bp, ap->nwords - 21);
genfs_node_init(vp, &adosfs_genfsops);
*vpp = vp;
brelse(bp, 0);
uvm_vnp_setsize(vp, ap->fsize);

View File

@ -1,4 +1,4 @@
/* $NetBSD: filecore_vfsops.c,v 1.48 2008/01/30 11:46:59 ad Exp $ */
/* $NetBSD: filecore_vfsops.c,v 1.49 2008/02/05 15:19:38 ad Exp $ */
/*-
* Copyright (c) 1994 The Regents of the University of California.
@ -66,7 +66,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: filecore_vfsops.c,v 1.48 2008/01/30 11:46:59 ad Exp $");
__KERNEL_RCSID(0, "$NetBSD: filecore_vfsops.c,v 1.49 2008/02/05 15:19:38 ad Exp $");
#if defined(_KERNEL_OPT)
#include "opt_compat_netbsd.h"
@ -577,6 +577,7 @@ filecore_vget(mp, ino, vpp)
ip->i_number = ino;
ip->i_block = -1;
ip->i_parent = -2;
genfs_node_init(vp, &filecore_genfsops);
/*
* Put it onto its hash chain and lock it so that other requests for
@ -657,7 +658,6 @@ filecore_vget(mp, ino, vpp)
* XXX need generation number?
*/
genfs_node_init(vp, &filecore_genfsops);
uvm_vnp_setsize(vp, ip->i_size);
*vpp = vp;
return (0);

View File

@ -1,4 +1,4 @@
/* $NetBSD: ext2fs_vfsops.c,v 1.130 2008/01/30 11:47:03 ad Exp $ */
/* $NetBSD: ext2fs_vfsops.c,v 1.131 2008/02/05 15:21:19 ad Exp $ */
/*
* Copyright (c) 1989, 1991, 1993, 1994
@ -65,7 +65,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: ext2fs_vfsops.c,v 1.130 2008/01/30 11:47:03 ad Exp $");
__KERNEL_RCSID(0, "$NetBSD: ext2fs_vfsops.c,v 1.131 2008/02/05 15:21:19 ad Exp $");
#if defined(_KERNEL_OPT)
#include "opt_compat_netbsd.h"
@ -981,6 +981,7 @@ retry:
ip->i_number = ino;
ip->i_e2fs_last_lblk = 0;
ip->i_e2fs_last_blk = 0;
genfs_node_init(vp, &ext2fs_genfsops);
/*
* Put it onto its hash chain and lock it so that other requests for
@ -1036,7 +1037,6 @@ retry:
* Finish inode initialization now that aliasing has been resolved.
*/
genfs_node_init(vp, &ext2fs_genfsops);
ip->i_devvp = ump->um_devvp;
VREF(ip->i_devvp);