From 8a050fbf3b6d2abf8c505402ec9ad8b5c15db4cd Mon Sep 17 00:00:00 2001 From: csjp Date: Tue, 5 Apr 2005 01:11:43 +0000 Subject: Assert that the vnode is locked. This is meant to catch bugs or mis-use of the vnode API in conditions where IO_NODELOCKED has been used without the vnode actually being locked. --- sys/kern/vfs_vnops.c | 1 + 1 file changed, 1 insertion(+) (limited to 'sys/kern') diff --git a/sys/kern/vfs_vnops.c b/sys/kern/vfs_vnops.c index afdeccf..8f90614 100644 --- a/sys/kern/vfs_vnops.c +++ b/sys/kern/vfs_vnops.c @@ -365,6 +365,7 @@ vn_rdwr(rw, vp, base, len, offset, segflg, ioflg, active_cred, file_cred, } } + ASSERT_VOP_LOCKED(vp, "IO_NODELOCKED with no vp lock held"); auio.uio_iov = &aiov; auio.uio_iovcnt = 1; aiov.iov_base = base; -- cgit v1.1