diff options
author | csjp <csjp@FreeBSD.org> | 2005-04-05 01:11:43 +0000 |
---|---|---|
committer | csjp <csjp@FreeBSD.org> | 2005-04-05 01:11:43 +0000 |
commit | 8a050fbf3b6d2abf8c505402ec9ad8b5c15db4cd (patch) | |
tree | 22903be9e3059281543a99311fce6080d6d1ed67 | |
parent | 1b586b1fd5c7a7ed994e210a5a3f07f62760ee83 (diff) | |
download | FreeBSD-src-8a050fbf3b6d2abf8c505402ec9ad8b5c15db4cd.zip FreeBSD-src-8a050fbf3b6d2abf8c505402ec9ad8b5c15db4cd.tar.gz |
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.
-rw-r--r-- | sys/kern/vfs_vnops.c | 1 |
1 files changed, 1 insertions, 0 deletions
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; |