From 0ada3afc253298c6dd80828b14dba1573e608941 Mon Sep 17 00:00:00 2001 From: Alexander Motin Date: Thu, 9 Apr 2015 13:09:05 +0000 Subject: Remove sleeps from geom_up thread on device destruction. MFC after: 3 days. --- sys/geom/multipath/g_multipath.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'sys/geom/multipath') diff --git a/sys/geom/multipath/g_multipath.c b/sys/geom/multipath/g_multipath.c index 7593ccaa238a..0953d1881759 100644 --- a/sys/geom/multipath/g_multipath.c +++ b/sys/geom/multipath/g_multipath.c @@ -369,9 +369,9 @@ g_multipath_done(struct bio *bp) mtx_lock(&sc->sc_mtx); (*cnt)--; if (*cnt == 0 && (cp->index & MP_LOST)) { - cp->index |= MP_POSTED; + if (g_post_event(g_mpd, cp, M_NOWAIT, NULL) == 0) + cp->index |= MP_POSTED; mtx_unlock(&sc->sc_mtx); - g_post_event(g_mpd, cp, M_WAITOK, NULL); } else mtx_unlock(&sc->sc_mtx); g_std_done(bp); -- cgit v1.3