diff options
author | Sebastien Marie <semarie@cvs.openbsd.org> | 2021-10-19 06:11:46 +0000 |
---|---|---|
committer | Sebastien Marie <semarie@cvs.openbsd.org> | 2021-10-19 06:11:46 +0000 |
commit | ad99ca7b42f45873f9f031d43db6672230f5fcf0 (patch) | |
tree | 91c831f08407f24ec3a81965e0f78f6d89f843ea /sys/nfs | |
parent | 4a7f2afe699910a9a6c87a504079c82b2bc4ef01 (diff) |
vnode: do not manipulate vnode lock directly
use VOP_LOCK / VOP_UNLOCK wrappers.
VOP_LOCK() is prefered over vn_lock() here in order to keep equivalent code.
ok mpi@ visa@ (as part of larger diff)
Diffstat (limited to 'sys/nfs')
-rw-r--r-- | sys/nfs/nfs_node.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/nfs/nfs_node.c b/sys/nfs/nfs_node.c index 81b900e83d2..5c98411501b 100644 --- a/sys/nfs/nfs_node.c +++ b/sys/nfs/nfs_node.c @@ -1,4 +1,4 @@ -/* $OpenBSD: nfs_node.c,v 1.71 2020/01/20 23:21:56 claudio Exp $ */ +/* $OpenBSD: nfs_node.c,v 1.72 2021/10/19 06:11:45 semarie Exp $ */ /* $NetBSD: nfs_node.c,v 1.16 1996/02/18 11:53:42 fvdl Exp $ */ /* @@ -146,7 +146,7 @@ loop: bcopy(fh, np->n_fhp, fhsize); np->n_fhsize = fhsize; /* lock the nfsnode, then put it on the rbtree */ - rrw_enter(&np->n_lock, RW_WRITE); + VOP_LOCK(vp, LK_EXCLUSIVE); np2 = RBT_INSERT(nfs_nodetree, &nmp->nm_ntree, np); KASSERT(np2 == NULL); np->n_accstamp = -1; |