vhold (9)
Leading comments
Copyright (C) 2001 Chad David <davidc@acns.ab.ca>. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice(s), this list of conditions and the following disclaimer as the first lines of this file unmodified other than the possible addition of one or more copyright notices. 2. Redistributions in binary for...
NAME
vhold , vdrop , vdropl - acquire/release a hold on a vnodeSYNOPSIS
In sys/param.h In sys/vnode.h Ft void Fn vhold struct vnode *vp Ft void Fn vholdl struct vnode *vp Ft void Fn vdrop struct vnode *vp Ft void Fn vdropl struct vnode *vpDESCRIPTION
The Fn vhold and Fn vholdl functions increment the v_holdcnt of the given vnode. If the vnode has already been added to the free list and is still referenced, it will be removed.The Fn vdrop and Fn vdropl functions decrement the v_holdcnt of the vnode. If the holdcount is less than or equal to zero prior to calling Fn vdrop or Fn vdropl , the system will panic. If the vnode is no longer referenced, it will be freed.
Fn vhold and Fn vdrop lock the vnode interlock while Fn vholdl and Fn vdropl expect the interlock to already be held.