vfs: inline vrefcnt

This commit is contained in:
Mateusz Guzik 2020-08-12 04:53:20 +00:00
parent 4c2d103a02
commit 36f47512d9
2 changed files with 6 additions and 17 deletions

View File

@ -2952,22 +2952,6 @@ vrefact(struct vnode *vp)
#endif
}
/*
* Return reference count of a vnode.
*
* The results of this call are only guaranteed when some mechanism is used to
* stop other processes from gaining references to the vnode. This may be the
* case if the caller holds the only reference. This is also useful when stale
* data is acceptable as race conditions may be accounted for by some other
* means.
*/
int
vrefcnt(struct vnode *vp)
{
return (vp->v_usecount);
}
void
vlazy(struct vnode *vp)
{

View File

@ -967,8 +967,13 @@ void vrele(struct vnode *vp);
void vref(struct vnode *vp);
void vrefl(struct vnode *vp);
void vrefact(struct vnode *vp);
int vrefcnt(struct vnode *vp);
void v_addpollinfo(struct vnode *vp);
static __inline int
vrefcnt(struct vnode *vp)
{
return (vp->v_usecount);
}
int vnode_create_vobject(struct vnode *vp, off_t size, struct thread *td);
void vnode_destroy_vobject(struct vnode *vp);