From 0b38bc0f44c2b76d4393e46b717504f7eb5864e7 Mon Sep 17 00:00:00 2001 From: kib Date: Mon, 9 Jan 2017 10:18:34 +0000 Subject: MFC r310615: Change knlist_destroy() to assertion. --- sys/kern/kern_event.c | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) (limited to 'sys/kern') diff --git a/sys/kern/kern_event.c b/sys/kern/kern_event.c index 10564e1..2c99803 100644 --- a/sys/kern/kern_event.c +++ b/sys/kern/kern_event.c @@ -2177,17 +2177,8 @@ void knlist_destroy(struct knlist *knl) { -#ifdef INVARIANTS - /* - * if we run across this error, we need to find the offending - * driver and have it call knlist_clear or knlist_delete. - */ - if (!SLIST_EMPTY(&knl->kl_list)) - printf("WARNING: destroying knlist w/ knotes on it!\n"); -#endif - - knl->kl_lockarg = knl->kl_lock = knl->kl_unlock = NULL; - SLIST_INIT(&knl->kl_list); + KASSERT(KNLIST_EMPTY(knl), + ("destroying knlist %p with knotes on it", knl)); } /* -- cgit v1.1