git: 887494153482 - stable/14 - namei: add more detail about LOCKSHARED's behavior
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Mon, 20 Jan 2025 16:36:53 UTC
The branch stable/14 has been updated by asomers: URL: https://cgit.FreeBSD.org/src/commit/?id=887494153482e4332f90a64a499ee1ed196ff25d commit 887494153482e4332f90a64a499ee1ed196ff25d Author: Alan Somers <asomers@FreeBSD.org> AuthorDate: 2024-12-17 20:10:57 +0000 Commit: Alan Somers <asomers@FreeBSD.org> CommitDate: 2025-01-20 16:36:24 +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 0be73f68cdda..63a6d3b11f6f 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 July 8, 2023 +.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