summaryrefslogtreecommitdiffstats
path: root/sys/kern/subr_witness.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/kern/subr_witness.c')
-rw-r--r--sys/kern/subr_witness.c20
1 files changed, 1 insertions, 19 deletions
diff --git a/sys/kern/subr_witness.c b/sys/kern/subr_witness.c
index 9c0005d..53fbb96 100644
--- a/sys/kern/subr_witness.c
+++ b/sys/kern/subr_witness.c
@@ -124,7 +124,6 @@ static int itismychild(struct witness *parent, struct witness *child);
static void removechild(struct witness *parent, struct witness *child);
static int isitmychild(struct witness *parent, struct witness *child);
static int isitmydescendant(struct witness *parent, struct witness *child);
-static int dup_ok(struct witness *);
static int blessed(struct witness *, struct witness *);
static void witness_display_list(void(*prnt)(const char *fmt, ...),
struct witness_list *list);
@@ -228,12 +227,6 @@ static struct witness_order_list_entry order_lists[] = {
{ NULL, NULL }
};
-static const char *dup_list[] = {
- "process lock",
- "process group",
- NULL
-};
-
/*
* Pairs of locks which have been blessed
* Don't complain about order problems with blessed locks
@@ -549,7 +542,7 @@ witness_lock(struct lock_object *lock, int flags, const char *file, int line)
lock1 = &(*lock_list)->ll_children[(*lock_list)->ll_count - 1];
w1 = lock1->li_lock->lo_witness;
if (w1 == w) {
- if (w->w_same_squawked || dup_ok(w))
+ if (w->w_same_squawked || (lock->lo_flags & LO_DUPOK))
goto out;
w->w_same_squawked = 1;
printf("acquiring duplicate lock of same type: \"%s\"\n",
@@ -1144,17 +1137,6 @@ witness_displaydescendants(void(*prnt)(const char *fmt, ...),
}
static int
-dup_ok(struct witness *w)
-{
- const char **dup;
-
- for (dup = dup_list; *dup != NULL; dup++)
- if (strcmp(w->w_name, *dup) == 0)
- return (1);
- return (0);
-}
-
-static int
blessed(struct witness *w1, struct witness *w2)
{
int i;
OpenPOWER on IntegriCloud