summaryrefslogtreecommitdiffstats
path: root/share
diff options
context:
space:
mode:
authordillon <dillon@FreeBSD.org>1999-09-24 10:42:45 +0000
committerdillon <dillon@FreeBSD.org>1999-09-24 10:42:45 +0000
commit8dad7db42856331f0ea4d7f17eca03f0782d454e (patch)
tree4de89544dcd56ff623340132a13bb77e5cb1ea38 /share
parent386338d04f80eaaa48efaff4c4eb26ee72ab2472 (diff)
downloadFreeBSD-src-8dad7db42856331f0ea4d7f17eca03f0782d454e.zip
FreeBSD-src-8dad7db42856331f0ea4d7f17eca03f0782d454e.tar.gz
More clarification of locking requirements.
Diffstat (limited to 'share')
-rw-r--r--share/man/man9/VOP_ATTRIB.98
-rw-r--r--share/man/man9/VOP_OPENCLOSE.916
2 files changed, 18 insertions, 6 deletions
diff --git a/share/man/man9/VOP_ATTRIB.9 b/share/man/man9/VOP_ATTRIB.9
index 4d26814..5c0f355 100644
--- a/share/man/man9/VOP_ATTRIB.9
+++ b/share/man/man9/VOP_ATTRIB.9
@@ -64,7 +64,13 @@ Attributes which are not being modified by
should be set to the value
.Dv VNOVAL .
.Sh LOCKS
-The file will not be locked on entry and should not be locked on return.
+.Xr VOP_GETATTR 9
+expects the vnode to be locked on entry and will leave the vnode locked on
+return.
+.Pp
+.Xr VOP_SETATTR 9
+expects the vnode to be locked on entry and will leave the vnode locked on
+return.
.Sh RETURN VALUES
.Xr VOP_GETATTR 9
returns information about the file in
diff --git a/share/man/man9/VOP_OPENCLOSE.9 b/share/man/man9/VOP_OPENCLOSE.9
index 8c0a0f6..00d308c 100644
--- a/share/man/man9/VOP_OPENCLOSE.9
+++ b/share/man/man9/VOP_OPENCLOSE.9
@@ -65,12 +65,18 @@ The access mode is a set of flags, including
.Dv O_NONBLOCK ,
.Dv O_APPEND .
.Sh LOCKS
-The vnode
-.Fa vp
-should be locked on entry and will still be locked on exit for
.Xr VOP_OPEN 9
-and unlocked on entry and exit for
-.Xr VOP_CLOSE 9 .
+expects
+.Fa vp
+to be locked on entry and will leave it locked on return.
+.Pp
+.Xr VOP_CLOSE 9
+expects at least a reference to be associated with the vnode and does not
+care whether the vnode is locked or not. The lock and reference state is
+left unchanged on return. Note that
+.Fa vn_close
+expects an unlocked, referenced vnode and will dereference the vnode prior
+to returning.
.Sh RETURN VALUES
Zero is returned on success, otherwise an error code is returned.
.Sh PSEUDOCODE
OpenPOWER on IntegriCloud