vhold.9 (b03ee585b421e5d3eaa95f6f5ea8c1803c107766) | vhold.9 (2164257702740979d6ffebaba02a3fd778aea2c3) |
---|---|
1.\" 2.\" Copyright (C) 2001 Chad David <davidc@acns.ab.ca>. All rights reserved. 3.\" 4.\" Redistribution and use in source and binary forms, with or without 5.\" modification, are permitted provided that the following conditions 6.\" are met: 7.\" 1. Redistributions of source code must retain the above copyright 8.\" notice(s), this list of conditions and the following disclaimer as --- 12 unchanged lines hidden (view full) --- 21.\" SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 22.\" CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 23.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 24.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH 25.\" DAMAGE. 26.\" 27.\" $FreeBSD$ 28.\" | 1.\" 2.\" Copyright (C) 2001 Chad David <davidc@acns.ab.ca>. All rights reserved. 3.\" 4.\" Redistribution and use in source and binary forms, with or without 5.\" modification, are permitted provided that the following conditions 6.\" are met: 7.\" 1. Redistributions of source code must retain the above copyright 8.\" notice(s), this list of conditions and the following disclaimer as --- 12 unchanged lines hidden (view full) --- 21.\" SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 22.\" CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 23.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 24.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH 25.\" DAMAGE. 26.\" 27.\" $FreeBSD$ 28.\" |
29.Dd April 1, 2007 | 29.Dd November 21, 2001 |
30.Dt VHOLD 9 31.Os 32.Sh NAME | 30.Dt VHOLD 9 31.Os 32.Sh NAME |
33.Nm vhold , vdrop , vdropl 34.Nd "acquire/release a hold on a vnode" | 33.Nm vhold 34.Nm vdrop 35.Nd "aquire/release a hold on a vnode" |
35.Sh SYNOPSIS 36.In sys/param.h 37.In sys/vnode.h 38.Ft void 39.Fn vhold "struct vnode *vp" 40.Ft void | 36.Sh SYNOPSIS 37.In sys/param.h 38.In sys/vnode.h 39.Ft void 40.Fn vhold "struct vnode *vp" 41.Ft void |
41.Fn vholdl "struct vnode *vp" 42.Ft void | |
43.Fn vdrop "struct vnode *vp" | 42.Fn vdrop "struct vnode *vp" |
44.Ft void 45.Fn vdropl "struct vnode *vp" | |
46.Sh DESCRIPTION 47The 48.Fn vhold | 43.Sh DESCRIPTION 44The 45.Fn vhold |
49and 50.Fn vholdl 51functions increment the 52.Va v_holdcnt 53of the given vnode. 54If the vnode has already been added to the free list and is still referenced, | 46function increments the v_holdcnt of the given vnode. 47If the vnode has already been added to the free list and is still referenced |
55it will be removed. 56.Pp 57The 58.Fn vdrop | 48it will be removed. 49.Pp 50The 51.Fn vdrop |
59and 60.Fn vdropl 61functions decrement the 62.Va v_holdcnt 63of the vnode. 64If the holdcount is less than or equal to zero prior to calling | 52function decrements the v_holdcnt of the vnode. 53If the holdcount is zero or less prior to calling |
65.Fn vdrop | 54.Fn vdrop |
66or 67.Fn vdropl , | |
68the system will panic. | 55the system will panic. |
69If the vnode is no longer referenced, it will be freed. 70.Pp 71.Fn vhold 72and 73.Fn vdrop 74lock the vnode interlock while 75.Fn vholdl 76and 77.Fn vdropl 78expect the interlock to already be held. | 56If the vnode is no longer referenced it will freed. |
79.Sh SEE ALSO | 57.Sh SEE ALSO |
80.Xr vnode 9 | 58.Xr vfree 9 , 59.Xr vbusy 9 |
81.Sh AUTHORS | 60.Sh AUTHORS |
82This manual page was written by | 61This man page was written by |
83.An Chad David Aq davidc@acns.ab.ca . | 62.An Chad David Aq davidc@acns.ab.ca . |