summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sys/geom/geom_event.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/sys/geom/geom_event.c b/sys/geom/geom_event.c
index 32351c3..5288e32 100644
--- a/sys/geom/geom_event.c
+++ b/sys/geom/geom_event.c
@@ -183,7 +183,10 @@ one_event(void)
g_topology_lock();
for (;;) {
mtx_lock(&g_eventlock);
- pp = TAILQ_FIRST(&g_doorstep);
+ TAILQ_FOREACH(pp, &g_doorstep, orphan) {
+ if (pp->nstart == pp->nend)
+ break;
+ }
if (pp != NULL) {
G_VALID_PROVIDER(pp);
TAILQ_REMOVE(&g_doorstep, pp, orphan);
OpenPOWER on IntegriCloud