Skip site navigation (1)Skip section navigation (2)

FreeBSD Manual Pages

  
 
  

home | help
VRELE(9)		   Kernel Developer's Manual		      VRELE(9)

NAME
       vput, vrele, vunref -- decrement	the use	count for a vnode

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

       void
       vput(struct vnode *vp);

       void
       vrele(struct vnode *vp);

       void
       vunref(struct vnode *vp);

DESCRIPTION
       Decrement the v_usecount	field of a vnode.

       vp  the vnode to	decrement

       The vrele() function takes an unlocked vnode and	returns	with the vnode
       unlocked.

       The vput() function should be given a locked vnode as argument, the vn-
       ode  is	unlocked  after	 the  function returned.  The vput() is	opera-
       tionally	equivalent to calling VOP_UNLOCK(9) followed by	vrele(),  with
       less overhead.

       The  vunref()  function	takes  a locked	vnode as argument, and returns
       with the	vnode locked.

       Any code	in the system which signified its use of a vnode  by  usecount
       should  call  one  of the listed	function to decrement use counter.  If
       the v_usecount field of the non-doomed vnode reaches zero, then it will
       be inactivated and placed on the	free list.

       The vrele() function may	lock  the  vnode.   All	 three	functions  may
       sleep.

       The  hold  count	 for the vnode is always greater or equal to the usec-
       ount.  Non-forced unmount fails when mount point	owns a vnode that  has
       non-zero	usecount, see vflush(9).

SEE ALSO
       vget(9),	vnode(9), vref(9), vrefcnt(9)

AUTHORS
       This manual page	was written by Doug Rabson and
       Konstantin Belousov.

FreeBSD	14.3		       February	24, 2016		      VRELE(9)

Want to link to this manual page? Use this URL:
<https://man.freebsd.org/cgi/man.cgi?query=vrele&sektion=9&manpath=FreeBSD+14.3-RELEASE+and+Ports>

home | help