From: mpi Date: Sat, 23 Oct 2021 14:08:46 +0000 (+0000) Subject: Assert that the KERNEL_LOCK() is held in vref(9). X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=57a040e7c01a07ed69121733c5e392a4a908161a;p=openbsd Assert that the KERNEL_LOCK() is held in vref(9). This is a guard against pushing the lock too far in UVM's vnode land. ok beck@ --- diff --git a/sys/kern/vfs_subr.c b/sys/kern/vfs_subr.c index 011e7597269..af78c42526e 100644 --- a/sys/kern/vfs_subr.c +++ b/sys/kern/vfs_subr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: vfs_subr.c,v 1.309 2021/10/21 09:59:14 claudio Exp $ */ +/* $OpenBSD: vfs_subr.c,v 1.310 2021/10/23 14:08:46 mpi Exp $ */ /* $NetBSD: vfs_subr.c,v 1.53 1996/04/22 01:39:13 christos Exp $ */ /* @@ -689,6 +689,8 @@ vget(struct vnode *vp, int flags) void vref(struct vnode *vp) { + KERNEL_ASSERT_LOCKED(); + #ifdef DIAGNOSTIC if (vp->v_usecount == 0) panic("vref used where vget required");