diff options
author | jeff <jeff@FreeBSD.org> | 2005-02-22 23:59:11 +0000 |
---|---|---|
committer | jeff <jeff@FreeBSD.org> | 2005-02-22 23:59:11 +0000 |
commit | 0d71606b28f40348cf50e0975609ef1438285b64 (patch) | |
tree | bbfd3a745351e714b3c29d791b1622479ffff81c /sys/kern/vfs_subr.c | |
parent | 81846eae9c1ead2fd3b85f87fd20d383fc28f037 (diff) | |
download | FreeBSD-src-0d71606b28f40348cf50e0975609ef1438285b64.zip FreeBSD-src-0d71606b28f40348cf50e0975609ef1438285b64.tar.gz |
- Add a check for xlock in vop_lock_assert. Presently the xlock is
considered to be as good as an exclusive lock, although there is still a
possibility of someone acquiring a VOP LOCK while xlock is held.
Sponsored by: Isilon Systems, Inc.
Diffstat (limited to 'sys/kern/vfs_subr.c')
-rw-r--r-- | sys/kern/vfs_subr.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/kern/vfs_subr.c b/sys/kern/vfs_subr.c index 931fbe5..0a8b352 100644 --- a/sys/kern/vfs_subr.c +++ b/sys/kern/vfs_subr.c @@ -3372,7 +3372,8 @@ void assert_vop_locked(struct vnode *vp, const char *str) { - if (vp && !IGNORE_LOCK(vp) && VOP_ISLOCKED(vp, NULL) == 0) + if (vp && !IGNORE_LOCK(vp) && VOP_ISLOCKED(vp, NULL) == 0 && + !((vp->v_iflag & VI_XLOCK) && vp->v_vxthread == curthread)) vfs_badlock("is not locked but should be", str, vp); } |