summaryrefslogtreecommitdiff
path: root/sys/kern/vfs_subr.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/kern/vfs_subr.c')
-rw-r--r--sys/kern/vfs_subr.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/sys/kern/vfs_subr.c b/sys/kern/vfs_subr.c
index f807760ea9d..794a4f2cf03 100644
--- a/sys/kern/vfs_subr.c
+++ b/sys/kern/vfs_subr.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: vfs_subr.c,v 1.307 2021/10/19 06:26:08 semarie Exp $ */
+/* $OpenBSD: vfs_subr.c,v 1.308 2021/10/20 06:35:39 semarie Exp $ */
/* $NetBSD: vfs_subr.c,v 1.53 1996/04/22 01:39:13 christos Exp $ */
/*
@@ -1075,6 +1075,9 @@ vclean(struct vnode *vp, int flags, struct proc *p)
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) {
@@ -1927,7 +1930,7 @@ vinvalbuf(struct vnode *vp, int flags, struct ucred *cred, struct proc *p,
int s, error;
#ifdef VFSLCKDEBUG
- if ((vp->v_op->vop_islocked != nullop) && !VOP_ISLOCKED(vp))
+ if ((vp->v_flag & VLOCKSWORK) && !VOP_ISLOCKED(vp))
panic("%s: vp isn't locked, vp %p", __func__, vp);
#endif