VHOLD(9) | Kernel Developer's Manual | VHOLD(9) |
vhold
, vdrop
— acquire/release a hold on a vnode
#include
<sys/param.h>
#include <sys/vnode.h>
void
vhold
(struct
vnode *vp);
void
vdrop
(struct
vnode *vp);
The
vhold
()
function increments the v_holdcnt of the given vnode.
If the vnode has already been added to the free list and its
v_holdcnt and v_usecount are
both zero, it will be removed from the free list and added to the vnode hold
list.
The
vdrop
()
function decrements the v_holdcnt of the given vnode.
If the vnode is on the vnode hold list and its
v_holdcnt and v_usecount are
both zero, it will be removed from the vnode hold list and added to the
freed list.
This man page was originally written by Chad David <davidc@acns.ab.ca> for FreeBSD.
July 17, 2013 | OpenBSD-current |