summaryrefslogtreecommitdiffstats
path: root/sys/geom/geom_subr.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/geom/geom_subr.c')
-rw-r--r--sys/geom/geom_subr.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/sys/geom/geom_subr.c b/sys/geom/geom_subr.c
index 3085c4b..6fe50f9 100644
--- a/sys/geom/geom_subr.c
+++ b/sys/geom/geom_subr.c
@@ -195,7 +195,15 @@ g_modevent(module_t mod, int type, void *data)
switch (type) {
case MOD_LOAD:
g_trace(G_T_TOPOLOGY, "g_modevent(%s, LOAD)", hh->mp->name);
- g_post_event(g_load_class, hh, M_WAITOK, NULL);
+ /*
+ * Once the system is not cold, MOD_LOAD calls will be
+ * from the userland and the g_event thread will be able
+ * to acknowledge their completion.
+ */
+ if (cold)
+ g_post_event(g_load_class, hh, M_WAITOK, NULL);
+ else
+ g_waitfor_event(g_load_class, hh, M_WAITOK, NULL);
error = 0;
break;
case MOD_UNLOAD:
OpenPOWER on IntegriCloud