Don't panic over the fact that unloading failed if we already knew that.

This commit is contained in:
Poul-Henning Kamp 2003-08-22 11:00:54 +00:00
parent e30b2eda02
commit 1f75de94ea
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=119298

View File

@ -186,9 +186,11 @@ g_modevent(module_t mod, int type, void *data)
error = g_waitfor_event(g_unload_class, hh, M_WAITOK, NULL);
if (error == 0)
error = hh->error;
g_waitidle();
KASSERT(LIST_EMPTY(&hh->mp->geom),
("Unloaded class (%s) still has geom", hh->mp->name));
if (error == 0) {
g_waitidle();
KASSERT(LIST_EMPTY(&hh->mp->geom),
("Unloaded class (%s) still has geom", hh->mp->name));
}
g_free(hh);
break;
}