From 807855890b5088ffe6569e426e964d11935c9ae6 Mon Sep 17 00:00:00 2001 From: markj Date: Mon, 8 Jan 2018 15:41:49 +0000 Subject: [PATCH] Release the queue lock before restarting the worker loop. Reported and tested by: pho MFC after: 3 days Sponsored by: Dell EMC Isilon --- sys/geom/mirror/g_mirror.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sys/geom/mirror/g_mirror.c b/sys/geom/mirror/g_mirror.c index 0c5e45be5acd..f9c8952b0949 100644 --- a/sys/geom/mirror/g_mirror.c +++ b/sys/geom/mirror/g_mirror.c @@ -1964,8 +1964,10 @@ g_mirror_worker(void *arg) continue; } } - if (g_mirror_event_first(sc) != NULL) + if (g_mirror_event_first(sc) != NULL) { + mtx_unlock(&sc->sc_queue_mtx); continue; + } sx_xunlock(&sc->sc_lock); MSLEEP(sc, &sc->sc_queue_mtx, PRIBIO | PDROP, "m:w1", timeout * hz);