git: d10640804e74 - stable/14 - nfs client: switch nfs_advlock() to use exclusive vnode lock
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Wed, 03 Sep 2025 02:05:40 UTC
The branch stable/14 has been updated by kib:
URL: https://cgit.FreeBSD.org/src/commit/?id=d10640804e74b84ba06102a1a399a34117f4cf41
commit d10640804e74b84ba06102a1a399a34117f4cf41
Author: Konstantin Belousov <kib@FreeBSD.org>
AuthorDate: 2025-08-27 16:57:06 +0000
Commit: Konstantin Belousov <kib@FreeBSD.org>
CommitDate: 2025-09-03 02:05:20 +0000
nfs client: switch nfs_advlock() to use exclusive vnode lock
(cherry picked from commit fe53e046cd9ce9c95a118ac0374e94336f16a37f)
---
sys/fs/nfsclient/nfs_clvnops.c | 7 +------
1 file changed, 1 insertion(+), 6 deletions(-)
diff --git a/sys/fs/nfsclient/nfs_clvnops.c b/sys/fs/nfsclient/nfs_clvnops.c
index 7f751d81d5e5..013ab2445a83 100644
--- a/sys/fs/nfsclient/nfs_clvnops.c
+++ b/sys/fs/nfsclient/nfs_clvnops.c
@@ -3253,7 +3253,7 @@ nfs_advlock(struct vop_advlock_args *ap)
u_quad_t size;
struct nfsmount *nmp;
- error = NFSVOPLOCK(vp, LK_SHARED);
+ error = NFSVOPLOCK(vp, LK_EXCLUSIVE);
if (error != 0)
return (EBADF);
nmp = VFSTONFS(vp->v_mount);
@@ -3290,11 +3290,6 @@ nfs_advlock(struct vop_advlock_args *ap)
cred = p->p_ucred;
else
cred = td->td_ucred;
- NFSVOPLOCK(vp, LK_UPGRADE | LK_RETRY);
- if (VN_IS_DOOMED(vp)) {
- error = EBADF;
- goto out;
- }
/*
* If this is unlocking a write locked region, flush and