git: f2e6f2444098 - stable/14 - p9fs: Call VN_LOCK_ASHARE on new vnodes
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Fri, 04 Jul 2025 13:29:00 UTC
The branch stable/14 has been updated by arrowd:
URL: https://cgit.FreeBSD.org/src/commit/?id=f2e6f24440984dce314a8eb3f9009cef3aae62b8
commit f2e6f24440984dce314a8eb3f9009cef3aae62b8
Author: Mark Johnston <markj@FreeBSD.org>
AuthorDate: 2025-06-13 19:08:09 +0000
Commit: Gleb Popov <arrowd@FreeBSD.org>
CommitDate: 2025-07-04 13:28:07 +0000
p9fs: Call VN_LOCK_ASHARE on new vnodes
We set MNTK_LOOKUP_SHARED on p9fs mounts, but disable shared locking of
vnodes (i.e., LK_SHARED requests are automatically translated to
LK_EXCLUSIVE.
Reviewed by: kib
Sponsored by: Klara, Inc.
Differential Revision: https://reviews.freebsd.org/D50759
(cherry picked from commit 5defdd5342c392880e3917ba0873fb49ddafc4c6)
---
sys/fs/p9fs/p9fs_vfsops.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/sys/fs/p9fs/p9fs_vfsops.c b/sys/fs/p9fs/p9fs_vfsops.c
index f674c866ce9d..3451bc052187 100644
--- a/sys/fs/p9fs/p9fs_vfsops.c
+++ b/sys/fs/p9fs/p9fs_vfsops.c
@@ -345,6 +345,8 @@ p9fs_vget_common(struct mount *mp, struct p9fs_node *np, int flags,
P9FS_SET_LINKS(inode);
lockmgr(vp->v_vnlock, LK_EXCLUSIVE, NULL);
+ if (vp->v_type != VFIFO)
+ VN_LOCK_ASHARE(vp);
error = insmntque(vp, mp);
if (error != 0) {
/*