mirror of
https://github.com/freebsd/freebsd-src
synced 2024-09-22 17:54:52 +00:00
Add the vnode interlock back around vref.
This commit is contained in:
parent
82dc3896f6
commit
483140ead1
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=32094
|
@ -36,7 +36,7 @@
|
|||
* SUCH DAMAGE.
|
||||
*
|
||||
* @(#)vfs_subr.c 8.31 (Berkeley) 5/26/95
|
||||
* $Id: vfs_subr.c,v 1.117 1997/12/29 00:22:45 dyson Exp $
|
||||
* $Id: vfs_subr.c,v 1.118 1997/12/29 01:03:41 dyson Exp $
|
||||
*/
|
||||
|
||||
/*
|
||||
|
@ -880,6 +880,14 @@ vget(vp, flags, p)
|
|||
return (0);
|
||||
}
|
||||
|
||||
void
|
||||
vref(struct vnode *vp)
|
||||
{
|
||||
simple_lock(&vp->v_interlock);
|
||||
vp->v_usecount++;
|
||||
simple_unlock(&vp->v_interlock);
|
||||
}
|
||||
|
||||
/*
|
||||
* Vnode put/release.
|
||||
* If count drops to zero, call inactive routine and return to freelist.
|
||||
|
|
|
@ -36,7 +36,7 @@
|
|||
* SUCH DAMAGE.
|
||||
*
|
||||
* @(#)vfs_subr.c 8.31 (Berkeley) 5/26/95
|
||||
* $Id: vfs_subr.c,v 1.117 1997/12/29 00:22:45 dyson Exp $
|
||||
* $Id: vfs_subr.c,v 1.118 1997/12/29 01:03:41 dyson Exp $
|
||||
*/
|
||||
|
||||
/*
|
||||
|
@ -880,6 +880,14 @@ vget(vp, flags, p)
|
|||
return (0);
|
||||
}
|
||||
|
||||
void
|
||||
vref(struct vnode *vp)
|
||||
{
|
||||
simple_lock(&vp->v_interlock);
|
||||
vp->v_usecount++;
|
||||
simple_unlock(&vp->v_interlock);
|
||||
}
|
||||
|
||||
/*
|
||||
* Vnode put/release.
|
||||
* If count drops to zero, call inactive routine and return to freelist.
|
||||
|
|
Loading…
Reference in a new issue