summaryrefslogtreecommitdiffstats
path: root/sys/geom/geom_subr.c
diff options
context:
space:
mode:
authorphk <phk@FreeBSD.org>2003-08-22 11:00:54 +0000
committerphk <phk@FreeBSD.org>2003-08-22 11:00:54 +0000
commitec0641f61630ffe803b82ec9feeac553afe16364 (patch)
treee7eedffdcaf16f6aab139afcb443f2221a8bd13e /sys/geom/geom_subr.c
parent09553313704418ab61211c92251b2af374d2e362 (diff)
downloadFreeBSD-src-ec0641f61630ffe803b82ec9feeac553afe16364.zip
FreeBSD-src-ec0641f61630ffe803b82ec9feeac553afe16364.tar.gz
Don't panic over the fact that unloading failed if we already knew that.
Diffstat (limited to 'sys/geom/geom_subr.c')
-rw-r--r--sys/geom/geom_subr.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/sys/geom/geom_subr.c b/sys/geom/geom_subr.c
index 98b8f8f..e05184f 100644
--- a/sys/geom/geom_subr.c
+++ b/sys/geom/geom_subr.c
@@ -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;
}
OpenPOWER on IntegriCloud