-/* $OpenBSD: vfs_subr.c,v 1.306 2021/08/31 15:31:28 claudio Exp $ */
+/* $OpenBSD: vfs_subr.c,v 1.307 2021/10/19 06:26:08 semarie Exp $ */
/* $NetBSD: vfs_subr.c,v 1.53 1996/04/22 01:39:13 christos Exp $ */
/*
vp->v_op = &dead_vops;
VN_KNOTE(vp, NOTE_REVOKE);
vp->v_tag = VT_NON;
-#ifdef VFSLCKDEBUG
- vp->v_flag &= ~VLOCKSWORK;
-#endif
mtx_enter(&vnode_mtx);
vp->v_lflag &= ~VXLOCK;
if (vp->v_lflag & VXWANT) {
int s, error;
#ifdef VFSLCKDEBUG
- if ((vp->v_flag & VLOCKSWORK) && !VOP_ISLOCKED(vp))
+ if ((vp->v_op->vop_islocked != nullop) && !VOP_ISLOCKED(vp))
panic("%s: vp isn't locked, vp %p", __func__, vp);
#endif
-/* $OpenBSD: vfs_vops.c,v 1.31 2021/10/04 08:11:02 claudio Exp $ */
+/* $OpenBSD: vfs_vops.c,v 1.32 2021/10/19 06:26:09 semarie Exp $ */
/*
* Copyright (c) 2010 Thordur I. Bjornsson <thib@openbsd.org>
*
#include <sys/systm.h>
#ifdef VFSLCKDEBUG
-#define ASSERT_VP_ISLOCKED(vp) do { \
- if (((vp)->v_flag & VLOCKSWORK) && !VOP_ISLOCKED(vp)) { \
- VOP_PRINT(vp); \
- panic("vp not locked"); \
- } \
+#define ASSERT_VP_ISLOCKED(vp) do { \
+ struct vnode *_vp = (vp); \
+ int r; \
+ if (_vp->v_op->vop_islocked == nullop) \
+ break; \
+ if ((r = VOP_ISLOCKED(_vp)) != LK_EXCLUSIVE) { \
+ VOP_PRINT(_vp); \
+ panic("%s: vp not locked, vp %p, %d", __func__, _vp, r);\
+ } \
} while (0)
#else
#define ASSERT_VP_ISLOCKED(vp) /* nothing */
-/* $OpenBSD: nfs_node.c,v 1.72 2021/10/19 06:11:45 semarie Exp $ */
+/* $OpenBSD: nfs_node.c,v 1.73 2021/10/19 06:26:09 semarie Exp $ */
/* $NetBSD: nfs_node.c,v 1.16 1996/02/18 11:53:42 fvdl Exp $ */
/*
}
vp = nvp;
-#ifdef VFSLCKDEBUG
- vp->v_flag |= VLOCKSWORK;
-#endif
rrw_init_flags(&np->n_lock, "nfsnode", RWL_DUPOK | RWL_IS_VNODE);
vp->v_data = np;
/* we now have an nfsnode on this vnode */
-/* $OpenBSD: vnode.h,v 1.160 2021/10/15 06:30:06 semarie Exp $ */
+/* $OpenBSD: vnode.h,v 1.161 2021/10/19 06:26:09 semarie Exp $ */
/* $NetBSD: vnode.h,v 1.38 1996/02/29 20:59:05 cgd Exp $ */
/*
#define VCLONED 0x0400 /* vnode was cloned */
#define VALIASED 0x0800 /* vnode has an alias */
#define VLARVAL 0x1000 /* vnode data not yet set up by higher level */
-#define VLOCKSWORK 0x4000 /* FS supports locking discipline */
-#define VCLONE 0x8000 /* vnode is a clone */
+#define VCLONE 0x4000 /* vnode is a clone */
/*
* (v_bioflag) Flags that may be manipulated by interrupt handlers
-/* $OpenBSD: ext2fs_subr.c,v 1.35 2016/08/10 07:53:02 natano Exp $ */
+/* $OpenBSD: ext2fs_subr.c,v 1.36 2021/10/19 06:26:09 semarie Exp $ */
/* $NetBSD: ext2fs_subr.c,v 1.1 1997/06/11 09:34:03 bouyer Exp $ */
/*
nvp->v_data = vp->v_data;
vp->v_data = NULL;
vp->v_op = &spec_vops;
-#ifdef VFSLCKDEBUG
- vp->v_flag &= ~VLOCKSWORK;
-#endif
vrele(vp);
vgone(vp);
/* Reinitialize aliased vnode. */
-/* $OpenBSD: ffs_subr.c,v 1.32 2016/08/10 11:33:01 natano Exp $ */
+/* $OpenBSD: ffs_subr.c,v 1.33 2021/10/19 06:26:09 semarie Exp $ */
/* $NetBSD: ffs_subr.c,v 1.6 1996/03/17 02:16:23 christos Exp $ */
/*
nvp->v_data = vp->v_data;
vp->v_data = NULL;
vp->v_op = &spec_vops;
-#ifdef VFSLCKDEBUG
- vp->v_flag &= ~VLOCKSWORK;
-#endif
vrele(vp);
vgone(vp);
/*
-/* $OpenBSD: ffs_vfsops.c,v 1.190 2021/10/04 08:11:02 claudio Exp $ */
+/* $OpenBSD: ffs_vfsops.c,v 1.191 2021/10/19 06:26:09 semarie Exp $ */
/* $NetBSD: ffs_vfsops.c,v 1.19 1996/02/09 22:22:26 christos Exp $ */
/*
return (error);
}
-#ifdef VFSLCKDEBUG
- vp->v_flag |= VLOCKSWORK;
-#endif
ip = pool_get(&ffs_ino_pool, PR_WAITOK|PR_ZERO);
rrw_init_flags(&ip->i_lock, "inode", RWL_DUPOK | RWL_IS_VNODE);
ip->i_ump = ump;
-/* $OpenBSD: uvm_vnode.c,v 1.116 2021/10/12 07:38:22 mpi Exp $ */
+/* $OpenBSD: uvm_vnode.c,v 1.117 2021/10/19 06:26:09 semarie Exp $ */
/* $NetBSD: uvm_vnode.c,v 1.36 2000/11/24 20:34:01 chs Exp $ */
/*
* carry over sanity check from old vnode pager: the vnode should
* be VOP_LOCK'd, and we confirm it here.
*/
- if ((vp->v_flag & VLOCKSWORK) && !VOP_ISLOCKED(vp))
+ if ((vp->v_op->vop_islocked != nullop) && !VOP_ISLOCKED(vp))
panic("uvm_vnp_uncache: vnode not locked!");
#endif