Correct vget by removing a window where a vnode can potentially go away.

This commit is contained in:
John Dyson 1996-09-28 03:36:07 +00:00
parent a2f4a84696
commit a8f42fa9a6
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=18527
2 changed files with 6 additions and 6 deletions

View file

@ -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++;
}
/*

View file

@ -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++;
}
/*