summaryrefslogtreecommitdiffstats
path: root/sys/geom/geom_event.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/geom/geom_event.c')
-rw-r--r--sys/geom/geom_event.c11
1 files changed, 3 insertions, 8 deletions
diff --git a/sys/geom/geom_event.c b/sys/geom/geom_event.c
index b02d088..3a1363e 100644
--- a/sys/geom/geom_event.c
+++ b/sys/geom/geom_event.c
@@ -273,21 +273,16 @@ one_event(void)
void
g_run_events()
{
- int i;
for (;;) {
g_topology_lock();
while (one_event())
;
mtx_assert(&g_eventlock, MA_OWNED);
- i = g_wither_work;
- if (i) {
+ if (g_wither_work) {
+ g_wither_work = 0;
mtx_unlock(&g_eventlock);
- while (i) {
- i = g_wither_washer();
- g_wither_work = i & 1;
- i &= 2;
- }
+ g_wither_washer();
g_topology_unlock();
} else {
g_topology_unlock();
OpenPOWER on IntegriCloud