From f3e89267c06935d11d71b27ef790e5886680d729 Mon Sep 17 00:00:00 2001 From: "Christian S.J. Peron" Date: Tue, 5 Apr 2005 01:11:43 +0000 Subject: [PATCH] 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(+) diff --git a/sys/kern/vfs_vnops.c b/sys/kern/vfs_vnops.c index afdeccf56310..8f906143c1a7 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;