diff options
author | dyson <dyson@FreeBSD.org> | 1996-09-28 03:36:07 +0000 |
---|---|---|
committer | dyson <dyson@FreeBSD.org> | 1996-09-28 03:36:07 +0000 |
commit | 3d9a637078051f717b3118796a8aefd0abc3720c (patch) | |
tree | 7c5b92327947593aab22b470d0a4b5e01a377604 /sys/kern/vfs_export.c | |
parent | bf83250c7666447225ca2f2ad5b379f955205259 (diff) | |
download | FreeBSD-src-3d9a637078051f717b3118796a8aefd0abc3720c.zip FreeBSD-src-3d9a637078051f717b3118796a8aefd0abc3720c.tar.gz |
Correct vget by removing a window where a vnode can potentially go away.
Diffstat (limited to 'sys/kern/vfs_export.c')
-rw-r--r-- | sys/kern/vfs_export.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/kern/vfs_export.c b/sys/kern/vfs_export.c index 899a247..61764b1 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.59 1996/08/21 21:55:21 dyson Exp $ + * $Id: vfs_subr.c,v 1.60 1996/09/19 18:20:22 nate Exp $ */ /* @@ -831,6 +831,8 @@ vref(vp) if (vp->v_usecount <= 0) panic("vref used where vget required"); + vp->v_usecount++; + if ((vp->v_type == VREG) && ((vp->v_object == NULL) || ((vp->v_object->flags & OBJ_VFS_REF) == 0)) ) { @@ -842,8 +844,6 @@ vref(vp) */ vfs_object_create(vp, curproc, curproc->p_ucred, 0); } - - vp->v_usecount++; } /* |