summaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
authorphk <phk@FreeBSD.org>2003-05-02 06:22:32 +0000
committerphk <phk@FreeBSD.org>2003-05-02 06:22:32 +0000
commite39be99d0405038a849546f1c158e2e2d6413829 (patch)
treeeb6e44e745608327ac3c08c932f7fccc56446293 /sys
parent887418fd11e01f6caf9e0de8255aa16e326897e3 (diff)
downloadFreeBSD-src-e39be99d0405038a849546f1c158e2e2d6413829.zip
FreeBSD-src-e39be99d0405038a849546f1c158e2e2d6413829.tar.gz
Use g_wither_geom() for cleanup.
Diffstat (limited to 'sys')
-rw-r--r--sys/geom/geom_disk.c3
-rw-r--r--sys/geom/geom_mirror.c7
2 files changed, 4 insertions, 6 deletions
diff --git a/sys/geom/geom_disk.c b/sys/geom/geom_disk.c
index ec2e9b8..f36ec05 100644
--- a/sys/geom/geom_disk.c
+++ b/sys/geom/geom_disk.c
@@ -354,10 +354,9 @@ disk_destroy(struct disk *dp)
gp = dp->d_geom;
if (gp == NULL)
return;
- gp->flags |= G_GEOM_WITHER;
gp->softc = NULL;
- g_orphan_provider(LIST_FIRST(&gp->provider), ENXIO);
devstat_remove_entry(dp->d_devstat);
+ g_wither_geom(gp, ENXIO);
}
static void
diff --git a/sys/geom/geom_mirror.c b/sys/geom/geom_mirror.c
index 7e1b4e7..9763853 100644
--- a/sys/geom/geom_mirror.c
+++ b/sys/geom/geom_mirror.c
@@ -69,19 +69,18 @@ static void
g_mirror_orphan(struct g_consumer *cp)
{
struct g_geom *gp;
- struct g_provider *pp;
+ int error;
g_topology_assert();
gp = cp->geom;
g_access_rel(cp, -cp->acr, -cp->acw, -cp->ace);
+ error = cp->provider->error;
g_detach(cp);
g_destroy_consumer(cp);
if (!LIST_EMPTY(&gp->consumer))
return;
- LIST_FOREACH(pp, &gp->provider, provider)
- g_orphan_provider(pp, ENXIO);
g_free(gp->softc);
- gp->flags |= G_GEOM_WITHER;
+ g_wither_geom(gp, error);
}
static void
OpenPOWER on IntegriCloud