summaryrefslogtreecommitdiffstats
path: root/sys/kern/kern_lock.c
diff options
context:
space:
mode:
authormarcel <marcel@FreeBSD.org>2013-05-09 16:28:18 +0000
committermarcel <marcel@FreeBSD.org>2013-05-09 16:28:18 +0000
commitbd49099038824e1817f3a5da01c52f82eebe392e (patch)
tree535b854fe8328f0254c6ce52fdd275b2f12140ed /sys/kern/kern_lock.c
parentce591b770b2ff012762738cb1f1bfeea4003d36c (diff)
downloadFreeBSD-src-bd49099038824e1817f3a5da01c52f82eebe392e.zip
FreeBSD-src-bd49099038824e1817f3a5da01c52f82eebe392e.tar.gz
Add option WITNESS_NO_VNODE to suppress printing LORs between VNODE
locks. To support this, VNODE locks are created with the LK_IS_VNODE flag. This flag is propagated down using the LO_IS_VNODE flag. Note that WITNESS still records the LOR. Only the printing and the optional entering into the kernel debugger is bypassed with the WITNESS_NO_VNODE option.
Diffstat (limited to 'sys/kern/kern_lock.c')
-rw-r--r--sys/kern/kern_lock.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/sys/kern/kern_lock.c b/sys/kern/kern_lock.c
index 7962ae1..849f583 100644
--- a/sys/kern/kern_lock.c
+++ b/sys/kern/kern_lock.c
@@ -393,6 +393,8 @@ lockinit(struct lock *lk, int pri, const char *wmesg, int timo, int flags)
iflags |= LO_WITNESS;
if (flags & LK_QUIET)
iflags |= LO_QUIET;
+ if (flags & LK_IS_VNODE)
+ iflags |= LO_IS_VNODE;
iflags |= flags & (LK_ADAPTIVE | LK_NOSHARE);
lk->lk_lock = LK_UNLOCKED;
OpenPOWER on IntegriCloud