Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 11 Jan 2018 00:54:54 +0000 (UTC)
From:      Mark Johnston <markj@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org
Subject:   svn commit: r327804 - stable/11/sys/geom/mirror
Message-ID:  <201801110054.w0B0sslu014573@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: markj
Date: Thu Jan 11 00:54:54 2018
New Revision: 327804
URL: https://svnweb.freebsd.org/changeset/base/327804

Log:
  MFC r327698:
  Release the queue lock before restarting the worker loop.

Modified:
  stable/11/sys/geom/mirror/g_mirror.c
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/sys/geom/mirror/g_mirror.c
==============================================================================
--- stable/11/sys/geom/mirror/g_mirror.c	Thu Jan 11 00:22:24 2018	(r327803)
+++ stable/11/sys/geom/mirror/g_mirror.c	Thu Jan 11 00:54:54 2018	(r327804)
@@ -1954,8 +1954,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);



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201801110054.w0B0sslu014573>