svn commit: r311771 - stable/11/sys/kern
Konstantin Belousov
kib at FreeBSD.org
Mon Jan 9 09:57:35 UTC 2017
Author: kib
Date: Mon Jan 9 09:57:34 2017
New Revision: 311771
URL: https://svnweb.freebsd.org/changeset/base/311771
Log:
MFC r310615:
Change knlist_destroy() to assertion.
Modified:
stable/11/sys/kern/kern_event.c
Directory Properties:
stable/11/ (props changed)
Modified: stable/11/sys/kern/kern_event.c
==============================================================================
--- stable/11/sys/kern/kern_event.c Mon Jan 9 09:53:07 2017 (r311770)
+++ stable/11/sys/kern/kern_event.c Mon Jan 9 09:57:34 2017 (r311771)
@@ -2249,17 +2249,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));
}
void
More information about the svn-src-stable
mailing list