summaryrefslogtreecommitdiffstats
path: root/sys/kern/vfs_subr.c
diff options
context:
space:
mode:
authorjeff <jeff@FreeBSD.org>2005-02-22 23:59:11 +0000
committerjeff <jeff@FreeBSD.org>2005-02-22 23:59:11 +0000
commit0d71606b28f40348cf50e0975609ef1438285b64 (patch)
treebbfd3a745351e714b3c29d791b1622479ffff81c /sys/kern/vfs_subr.c
parent81846eae9c1ead2fd3b85f87fd20d383fc28f037 (diff)
downloadFreeBSD-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.c3
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);
}
OpenPOWER on IntegriCloud