summaryrefslogtreecommitdiff
path: root/static/freebsd/man9/vrele.9 4.html
blob: 09d1a7bd41695dae1fe8cc3ac4a03f1acb1c1fbc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
<table class="head">
  <tr>
    <td class="head-ltitle">VRELE(9)</td>
    <td class="head-vol">Kernel Developer's Manual</td>
    <td class="head-rtitle">VRELE(9)</td>
  </tr>
</table>
<div class="manual-text">
<section class="Sh">
<h1 class="Sh" id="NAME"><a class="permalink" href="#NAME">NAME</a></h1>
<p class="Pp"><code class="Nm">vput</code>, <code class="Nm">vrele</code>,
    <code class="Nm">vunref</code> &#x2014; <span class="Nd">decrement the use
    count for a vnode</span></p>
</section>
<section class="Sh">
<h1 class="Sh" id="SYNOPSIS"><a class="permalink" href="#SYNOPSIS">SYNOPSIS</a></h1>
<p class="Pp"><code class="In">#include
    &lt;<a class="In">sys/param.h</a>&gt;</code>
  <br/>
  <code class="In">#include &lt;<a class="In">sys/vnode.h</a>&gt;</code></p>
<p class="Pp"><var class="Ft">void</var>
  <br/>
  <code class="Fn">vput</code>(<var class="Fa" style="white-space: nowrap;">struct
    vnode *vp</var>);</p>
<p class="Pp"><var class="Ft">void</var>
  <br/>
  <code class="Fn">vrele</code>(<var class="Fa" style="white-space: nowrap;">struct
    vnode *vp</var>);</p>
<p class="Pp"><var class="Ft">void</var>
  <br/>
  <code class="Fn">vunref</code>(<var class="Fa" style="white-space: nowrap;">struct
    vnode *vp</var>);</p>
</section>
<section class="Sh">
<h1 class="Sh" id="DESCRIPTION"><a class="permalink" href="#DESCRIPTION">DESCRIPTION</a></h1>
<p class="Pp">Decrement the <var class="Va">v_usecount</var> field of a
  vnode.</p>
<dl class="Bl-tag">
  <dt><var class="Fa">vp</var></dt>
  <dd>the vnode to decrement</dd>
</dl>
<p class="Pp" id="vrele">The
    <a class="permalink" href="#vrele"><code class="Fn">vrele</code></a>()
    function takes an unlocked vnode and returns with the vnode unlocked.</p>
<p class="Pp" id="vput">The
    <a class="permalink" href="#vput"><code class="Fn">vput</code></a>()
    function should be given a locked vnode as argument, the vnode is unlocked
    after the function returned. The <code class="Fn">vput</code>() is
    operationally equivalent to calling <a class="Xr">VOP_UNLOCK(9)</a> followed
    by <code class="Fn">vrele</code>(), with less overhead.</p>
<p class="Pp" id="vunref">The
    <a class="permalink" href="#vunref"><code class="Fn">vunref</code></a>()
    function takes a locked vnode as argument, and returns with the vnode
    locked.</p>
<p class="Pp">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 <var class="Va">v_usecount</var> field of the non-doomed vnode reaches
    zero, then it will be inactivated and placed on the free list.</p>
<p class="Pp" id="vrele~2">The
    <a class="permalink" href="#vrele~2"><code class="Fn">vrele</code></a>()
    function may lock the vnode. All three functions may sleep.</p>
<p class="Pp">The hold count for the vnode is always greater or equal to the
    usecount. Non-forced unmount fails when mount point owns a vnode that has
    non-zero usecount, see <a class="Xr">vflush(9)</a>.</p>
</section>
<section class="Sh">
<h1 class="Sh" id="SEE_ALSO"><a class="permalink" href="#SEE_ALSO">SEE
  ALSO</a></h1>
<p class="Pp"><a class="Xr">vget(9)</a>, <a class="Xr">vnode(9)</a>,
    <a class="Xr">vref(9)</a>, <a class="Xr">vrefcnt(9)</a></p>
</section>
<section class="Sh">
<h1 class="Sh" id="AUTHORS"><a class="permalink" href="#AUTHORS">AUTHORS</a></h1>
<p class="Pp">This manual page was written by <span class="An">Doug
    Rabson</span> and
  <br/>
  <span class="An">Konstantin Belousov</span>.</p>
</section>
</div>
<table class="foot">
  <tr>
    <td class="foot-date">February 24, 2016</td>
    <td class="foot-os">FreeBSD 15.0</td>
  </tr>
</table>