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
1. vnodeops(9) has a small typo (vp instead of dvp).

2. VOP_GETATTR can be called either locked or unlocked, that should be 
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.
man 9 vnodeops
--- ./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.
+Note that the vnode can be either locked or unlocked.
 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.
 updates the reference counts prior to returning.
+The caller of
+must hold the vfs renamelock aquired by
+and exited by
 .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