svn commit: r311773 - stable/10/sys/kern
Konstantin Belousov
kib at FreeBSD.org
Mon Jan 9 10:18:36 UTC 2017
Author: kib
Date: Mon Jan 9 10:18:34 2017
New Revision: 311773
URL: https://svnweb.freebsd.org/changeset/base/311773
Log:
MFC r310615:
Change knlist_destroy() to assertion.
Modified:
stable/10/sys/kern/kern_event.c
Directory Properties:
stable/10/ (props changed)
Modified: stable/10/sys/kern/kern_event.c
==============================================================================
--- stable/10/sys/kern/kern_event.c Mon Jan 9 10:13:53 2017 (r311772)
+++ stable/10/sys/kern/kern_event.c Mon Jan 9 10:18:34 2017 (r311773)
@@ -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));
}
/*
More information about the svn-src-all
mailing list