NetBSD-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
kern/45276: vnodeops(9) has small typo; does not mention vfs renamelock; does not mention locking state
>Number: 45276
>Category: kern
>Synopsis: vnodeops(9) has small typo; does not mention vfs renamelock;
>does not mention locking state
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: kern-bug-people
>State: open
>Class: doc-bug
>Submitter-Id: net
>Arrival-Date: Sat Aug 20 10:00:01 +0000 2011
>Originator: Julian Fagir
>Release: NetBSD-current
>Organization:
>Environment:
>Description:
1. vnodeops(9) has a small typo (vp instead of dvp).
2. VOP_GETATTR can be called either locked or unlocked, that should be
mentioned.
sys/fs/union/union_vnops.c reports that.
3. The caller of VOP_RENAME needs to hold the rename lock of its vfs to rename
the file.
>How-To-Repeat:
man 9 vnodeops
>Fix:
--- ./share/man/man9/vnodeops.9.orig 2011-08-11 23:09:36.000000000 +0200
+++ ./share/man/man9/vnodeops.9 2011-08-11 23:14:43.000000000 +0200
@@ -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" \
@@ -565,6 +565,8 @@
.Fa vap .
Attributes which are not available are set to the value VNOVAL.
.Pp
+Note that the vnode can be either locked or unlocked.
+.Pp
For more information on vnode attributes see
.Xr vattr 9 .
.It Fn VOP_SETATTR "vp" "vap" "cred"
@@ -852,6 +854,13 @@
The target directory and file vnodes should both be locked on entry.
.Fn VOP_RENAME
updates the reference counts prior to returning.
+.Pp
+The caller of
+.Fn VOP_RENAME
+must hold the vfs renamelock aquired by
+.Fn VFS_RENAMELOCK_ENTER
+and exited by
+.Fn VFS_RENAMELOCK_EXIT .
.It Fn VOP_MKDIR "dvp" "vpp" "cnp" "vap"
Make a new directory in a given directory.
The argument
Home |
Main Index |
Thread Index |
Old Index