summaryrefslogtreecommitdiff
path: root/share
diff options
context:
space:
mode:
authorJason McIntyre <jmc@cvs.openbsd.org>2012-09-17 05:50:54 +0000
committerJason McIntyre <jmc@cvs.openbsd.org>2012-09-17 05:50:54 +0000
commit3ed61e53655701e1dbf388c25b9a17f606f59f3c (patch)
tree44cf5bacc5c6510a6b87f266201b11ddc9bc0239 /share
parent6c96dc2aebd3752ef45888ef79b75bab6b6277aa (diff)
document vdrop; original diff from Michal Mazurek
text rewrite/ok guenther
Diffstat (limited to 'share')
-rw-r--r--share/man/man9/Makefile3
-rw-r--r--share/man/man9/vhold.923
2 files changed, 21 insertions, 5 deletions
diff --git a/share/man/man9/Makefile b/share/man/man9/Makefile
index 42791642836..12f6dc30932 100644
--- a/share/man/man9/Makefile
+++ b/share/man/man9/Makefile
@@ -1,4 +1,4 @@
-# $OpenBSD: Makefile,v 1.171 2012/06/21 18:02:21 matthew Exp $
+# $OpenBSD: Makefile,v 1.172 2012/09/17 05:50:53 jmc Exp $
# $NetBSD: Makefile,v 1.4 1996/01/09 03:23:01 thorpej Exp $
# Makefile for section 9 (kernel function and variable) manual pages.
@@ -373,5 +373,6 @@ MLINKS+=VOP_LOOKUP.9 VOP_ABORTOP.9 VOP_LOOKUP.9 VOP_ACCESS.9 \
MLINKS+=workq_add_task.9 workq_create.9 \
workq_add_task.9 workq_queue_task.9 \
workq_add_task.9 workq_destroy.9
+MLINKS+=vhold.9 vdrop.9
.include <bsd.prog.mk>
diff --git a/share/man/man9/vhold.9 b/share/man/man9/vhold.9
index b9a23b4434e..7ce9f2d5c00 100644
--- a/share/man/man9/vhold.9
+++ b/share/man/man9/vhold.9
@@ -1,4 +1,4 @@
-.\" $OpenBSD: vhold.9,v 1.6 2009/12/15 07:34:58 jmc Exp $
+.\" $OpenBSD: vhold.9,v 1.7 2012/09/17 05:50:53 jmc Exp $
.\"
.\" Copyright (C) 2001 Chad David <davidc@acns.ab.ca>. All rights reserved.
.\"
@@ -27,17 +27,20 @@
.\"
.\" $FreeBSD: src/share/man/man9/vhold.9,v 1.2 2001/12/14 09:11:13 ru Exp $
.\"
-.Dd $Mdocdate: December 15 2009 $
+.Dd $Mdocdate: September 17 2012 $
.Dt VHOLD 9
.Os
.Sh NAME
-.Nm vhold
-.Nd acquire a hold on a vnode
+.Nm vhold ,
+.Nm vdrop
+.Nd acquire/release a hold on a vnode
.Sh SYNOPSIS
.Fd #include <sys/param.h>
.Fd #include <sys/vnode.h>
.Ft void
.Fn vhold "struct vnode *vp"
+.Ft void
+.Fn vdrop "struct vnode *vp"
.Sh DESCRIPTION
The
.Fn vhold
@@ -50,6 +53,18 @@ and
.Va v_usecount
are both zero, it will be removed from the free list and
added to the vnode hold list.
+.Pp
+The
+.Fn vdrop
+function decrements the
+.Va v_holdcnt
+of the given vnode.
+If the vnode is on the vnode hold list and its
+.Va v_holdcnt
+and
+.Va v_usecount
+are both zero, it will be removed from the vnode hold list and
+added to the freed list.
.Sh SEE ALSO
.Xr vnode 9
.Sh AUTHORS