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)
-/* $OpenBSD: cd9660_node.c,v 1.37 2021/03/05 07:10:06 jsg Exp $ */
+/* $OpenBSD: cd9660_node.c,v 1.38 2021/10/19 06:11:45 semarie Exp $ */
/* $NetBSD: cd9660_node.c,v 1.17 1997/05/05 07:13:57 mycroft Exp $ */
/*-
*ipp = ip;
/* XXX locking unlock hash list? */
- rrw_enter(&ip->i_lock, RW_WRITE);
+ VOP_LOCK(ITOV(ip), LK_EXCLUSIVE);
return (0);
}
-/* $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 $ */
/*
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;
-/* $OpenBSD: ufs_ihash.c,v 1.25 2021/03/11 13:31:36 jsg Exp $ */
+/* $OpenBSD: ufs_ihash.c,v 1.26 2021/10/19 06:11:45 semarie Exp $ */
/* $NetBSD: ufs_ihash.c,v 1.3 1996/02/09 22:36:04 christos Exp $ */
/*
ufsino_t inum = ip->i_number;
/* lock the inode, then put it on the appropriate hash list */
- rrw_enter(&ip->i_lock, RW_WRITE);
+ VOP_LOCK(ITOV(ip), LK_EXCLUSIVE);
/* XXXLOCKING lock hash list */
LIST_FOREACH(curip, ipp, i_hash) {
if (inum == curip->i_number && dev == curip->i_dev) {
/* XXXLOCKING unlock hash list? */
- rrw_exit(&ip->i_lock);
+ VOP_UNLOCK(ITOV(ip));
return (EEXIST);
}
}