Adjustments based on suggestions from gnrp in PR 45276:

- fix argument names of VOP_REMOVE
 - mention deprecated behavior of calling VOP_GETATTR unlocked
 - mention rename lock
This commit is contained in:
dholland 2014-07-21 05:56:26 +00:00
parent e40402f997
commit d1d67f621b
1 changed files with 14 additions and 3 deletions

View File

@ -1,4 +1,4 @@
.\" $NetBSD: vnodeops.9,v 1.93 2014/02/27 16:51:37 hannken Exp $
.\" $NetBSD: vnodeops.9,v 1.94 2014/07/21 05:56:26 dholland Exp $
.\"
.\" Copyright (c) 2001, 2005, 2006 The NetBSD Foundation, Inc.
.\" All rights reserved.
@ -27,7 +27,7 @@
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
.\" POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd February 27, 2014
.Dd July 21, 2014
.Dt VNODEOPS 9
.Os
.Sh NAME
@ -135,7 +135,7 @@
.Fn VOP_SEEK "struct vnode *vp" "off_t oldoff" "off_t newoff" \
"kauth_cred_t cred"
.Ft int
.Fn VOP_REMOVE "struct vnode *vp" "struct vnode *vp" \
.Fn VOP_REMOVE "struct vnode *dvp" "struct vnode *vp" \
"struct componentname *cnp"
.Ft int
.Fn VOP_LINK "struct vnode *dvp" "struct vnode *vp" \
@ -555,6 +555,10 @@ Attributes which are not available are set to the value VNOVAL.
.Pp
For more information on vnode attributes see
.Xr vattr 9 .
Historically it was considered acceptable to call
.Fn VOP_GETATTR
without first locking the vnode.
This usage is deprecated.
.Pp
The vnode
.Fa vp
@ -851,11 +855,18 @@ is the pathname component about the file's new name.
If the operation is successful zero is returned, otherwise an error
code is returned.
.Pp
The caller must hold the target file system's rename lock.
The source directory and file vnodes should be unlocked and their
reference counts should be incremented before entry.
The target directory and file vnodes should both be locked on entry.
.Fn VOP_RENAME
updates the reference counts prior to returning.
.Pp
Because of the complexity and nastiness of the interface, please do
not write new code that calls
.Fn VOP_RENAME
directly until such time as ongoing cleanup work reaches a point where
the interface has been rendered halfway sane.
.It Fn VOP_MKDIR "dvp" "vpp" "cnp" "vap"
Make a new directory in a given directory.
The argument