summaryrefslogtreecommitdiffstats
path: root/sys/kern
diff options
context:
space:
mode:
authorjeff <jeff@FreeBSD.org>2005-04-22 22:39:46 +0000
committerjeff <jeff@FreeBSD.org>2005-04-22 22:39:46 +0000
commitb29bfc6efa41286e8e8c40ca78e9a0a595d83376 (patch)
tree851896f56a454007801cbf175e62247c8b23aca2 /sys/kern
parent5310acaed04a785eaf62ce20cf36a26f0a964776 (diff)
downloadFreeBSD-src-b29bfc6efa41286e8e8c40ca78e9a0a595d83376.zip
FreeBSD-src-b29bfc6efa41286e8e8c40ca78e9a0a595d83376.tar.gz
- Check LO_DUPOK as well as LOP_DUPOK when determining whether we should
warn about duplicate acquires. Sponsored by: Isilon Systems, Inc.
Diffstat (limited to 'sys/kern')
-rw-r--r--sys/kern/subr_witness.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/kern/subr_witness.c b/sys/kern/subr_witness.c
index ecba17f..f56b6d5 100644
--- a/sys/kern/subr_witness.c
+++ b/sys/kern/subr_witness.c
@@ -791,7 +791,8 @@ witness_checkorder(struct lock_object *lock, int flags, const char *file,
lock1 = &(*lock_list)->ll_children[(*lock_list)->ll_count - 1];
w1 = lock1->li_lock->lo_witness;
if (w1 == w) {
- if (w->w_same_squawked || (lock->lo_flags & LO_DUPOK))
+ if (w->w_same_squawked || (lock->lo_flags & LO_DUPOK) ||
+ (flags & LOP_DUPOK))
return;
w->w_same_squawked = 1;
printf("acquiring duplicate lock of same type: \"%s\"\n",
OpenPOWER on IntegriCloud