The branch stable/13 has been updated by asomers: URL: https://cgit.FreeBSD.org/src/commit/?id=4ded81daacec72e16da6cdb64bde8edd4a8fe0e4
commit 4ded81daacec72e16da6cdb64bde8edd4a8fe0e4 Author: Alan Somers <asom...@freebsd.org> AuthorDate: 2024-12-17 20:10:57 +0000 Commit: Alan Somers <asom...@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 .\" - eiv...@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