Use g_wither_geom() for cleanup.
This commit is contained in:
parent
6b60a2cd57
commit
03af3a23dd
@ -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
|
||||
|
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user