VRECYCLE(9)                  OpenBSD Kernel Manual                 VRECYCLE(9)

NAME
     vrecycle - recycle a vnode if its usecount is zero

SYNOPSIS
     #include <sys/param.h>
     #include <sys/vnode.h>

     int
     vrecycle(struct vnode *vp, struct simplelock *inter_lkp, struct proc *p);

DESCRIPTION
     The vrecycle() function places a vnode vp on the free list using
     vgonel(9) if its v_usecount field is zero.  If the usecount is not zero
     it simply returns.  If its usecount is zero and an interlock inter_lkp
     was passed, this will be unlocked before calling vgonel(9).

RETURN VALUES
     vrecycle() will return 1 if the vnode was placed on the free list.  It
     will return 0 if the usecount was not zero, and any lock passed in
     inter_lkp will still be locked.

SEE ALSO
     vgonel(9), vnode(9)

HISTORY
     This man page was originally written for OpenBSD.

OpenBSD 3.5                    February 18, 2002                             1
