aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--share/man/man9/Makefile3
-rw-r--r--share/man/man9/vhold.926
2 files changed, 24 insertions, 5 deletions
diff --git a/share/man/man9/Makefile b/share/man/man9/Makefile
index 1e2c44d91f09..3830076a1afd 100644
--- a/share/man/man9/Makefile
+++ b/share/man/man9/Makefile
@@ -1182,7 +1182,8 @@ MLINKS+=vfs_getopt.9 vfs_getopts.9 \
vfs_getopt.9 vfs_filteropt.9
MLINKS+=VFS_LOCK_GIANT.9 VFS_UNLOCK_GIANT.9
MLINKS+=vgone.9 vgonel.9
-MLINKS+=vhold.9 vdrop.9
+MLINKS+=vhold.9 vdrop.9 \
+ vhold.9 vdropl.9
MLINKS+=vm_map_lock.9 vm_map_lock_downgrade.9 \
vm_map_lock.9 vm_map_lock_read.9 \
vm_map_lock.9 vm_map_lock_upgrade.9 \
diff --git a/share/man/man9/vhold.9 b/share/man/man9/vhold.9
index e2f985cfe7e8..6eafd3fc3db5 100644
--- a/share/man/man9/vhold.9
+++ b/share/man/man9/vhold.9
@@ -26,11 +26,11 @@
.\"
.\" $FreeBSD$
.\"
-.Dd November 21, 2001
+.Dd April 1, 2007
.Dt VHOLD 9
.Os
.Sh NAME
-.Nm vhold , vdrop
+.Nm vhold , vdrop , vdropl
.Nd "acquire/release a hold on a vnode"
.Sh SYNOPSIS
.In sys/param.h
@@ -39,6 +39,8 @@
.Fn vhold "struct vnode *vp"
.Ft void
.Fn vdrop "struct vnode *vp"
+.Ft void
+.Fn vdropl "struct vnode *vp"
.Sh DESCRIPTION
The
.Fn vhold
@@ -50,13 +52,29 @@ it will be removed.
.Pp
The
.Fn vdrop
-function decrements the
+and
+.Fn vdropl
+functions decrement the
.Va v_holdcnt
of the vnode.
If the holdcount is less than or equal to zero prior to calling
-.Fn vdrop ,
+.Fn vdrop
+or
+.Fn vdropl ,
the system will panic.
If the vnode is no longer referenced, it will be freed.
+.Pp
+The difference between
+.Fn vdrop
+and
+.Fn vdropl
+is that
+.Fn vdrop
+locks the vnode interlock and then calls
+.Fn vdropl
+while
+.Fn vdropl
+expects the interlock to already be locked.
.Sh SEE ALSO
.Xr vbusy 9 ,
.Xr vfree 9