git: 4ded81daacec - stable/13 - namei: add more detail about LOCKSHARED's behavior
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Mon, 20 Jan 2025 22:34:00 UTC
The branch stable/13 has been updated by asomers:
URL: https://cgit.FreeBSD.org/src/commit/?id=4ded81daacec72e16da6cdb64bde8edd4a8fe0e4
commit 4ded81daacec72e16da6cdb64bde8edd4a8fe0e4
Author: Alan Somers <asomers@FreeBSD.org>
AuthorDate: 2024-12-17 20:10:57 +0000
Commit: Alan Somers <asomers@FreeBSD.org>
CommitDate: 2025-01-20 22:33:53 +0000
namei: add more detail about LOCKSHARED's behavior
[skip ci]
Sponsored by: ConnectWise
Reviewed by: markj
Differential Revision: https://reviews.freebsd.org/D48125
(cherry picked from commit 22bb70a6b3bb7799276ab480e40665b7d6e4ce25)
---
share/man/man9/namei.9 | 19 +++++++++++++++----
1 file changed, 15 insertions(+), 4 deletions(-)
diff --git a/share/man/man9/namei.9 b/share/man/man9/namei.9
index 8890abedcc59..9e60985a4965 100644
--- a/share/man/man9/namei.9
+++ b/share/man/man9/namei.9
@@ -31,7 +31,7 @@
.\" If you integrate this manpage in another OS, I'd appreciate a note
.\" - eivind@FreeBSD.org
.\"
-.Dd May 23, 2015
+.Dd December 17, 2024
.Dt NAMEI 9
.Os
.Sh NAME
@@ -124,7 +124,6 @@ Lock vnode on return with
unless
.Dv LOCKSHARED
is also set.
-The
.Xr VOP_UNLOCK 9
should be used
to release the lock (or
@@ -153,8 +152,20 @@ and
.Xr vrele 9 .
.It Dv LOCKSHARED
Lock vnode on return with
-.Dv LK_SHARED .
-The
+.Dv LK_SHARED ,
+if permitted by the file system that owns the vnode.
+The file system must explicitly permit this by setting
+.Dv MNTK_LOOKUP_SHARED
+in
+.Dv mp->mnt_kern_flag
+during mount and by calling
+.Fn VN_LOCK_ASHARE
+when allocating the vnode.
+If
+.Dv LOCKLEAF
+is specified but shared locking is not permitted, then the vnode will be
+returned with
+.Dv LK_EXCLUSIVE .
.Xr VOP_UNLOCK 9
should be used
to release the lock (or