summaryrefslogtreecommitdiffstats
path: root/sys/geom/mirror/g_mirror.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/geom/mirror/g_mirror.c')
-rw-r--r--sys/geom/mirror/g_mirror.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/sys/geom/mirror/g_mirror.c b/sys/geom/mirror/g_mirror.c
index e315f51..0c48a94 100644
--- a/sys/geom/mirror/g_mirror.c
+++ b/sys/geom/mirror/g_mirror.c
@@ -2139,10 +2139,9 @@ g_mirror_destroy_provider(struct g_mirror_softc *sc)
mtx_unlock(&sc->sc_queue_mtx);
G_MIRROR_DEBUG(0, "Device %s: provider %s destroyed.", sc->sc_name,
sc->sc_provider->name);
- sc->sc_provider->flags |= G_PF_WITHER;
- g_orphan_provider(sc->sc_provider, ENXIO);
- g_topology_unlock();
+ g_wither_provider(sc->sc_provider, ENXIO);
sc->sc_provider = NULL;
+ g_topology_unlock();
LIST_FOREACH(disk, &sc->sc_disks, d_next) {
if (disk->d_state == G_MIRROR_DISK_STATE_SYNCHRONIZING)
g_mirror_sync_stop(disk, 1);
OpenPOWER on IntegriCloud