summaryrefslogtreecommitdiffstats
path: root/sys/geom/geom_slice.c
diff options
context:
space:
mode:
authortrasz <trasz@FreeBSD.org>2012-07-07 17:09:44 +0000
committertrasz <trasz@FreeBSD.org>2012-07-07 17:09:44 +0000
commitc29dc3c9613cfe4e9eb56a0a18c9bf11bd02992b (patch)
tree1b1be4494336dbf14054f0f13f4b81b948f45569 /sys/geom/geom_slice.c
parent2a7f91bf1afb27f4cfcf5f29aded548db4a01a18 (diff)
downloadFreeBSD-src-c29dc3c9613cfe4e9eb56a0a18c9bf11bd02992b.zip
FreeBSD-src-c29dc3c9613cfe4e9eb56a0a18c9bf11bd02992b.tar.gz
Fix orphan() methods of several GEOM classes to not assume that there
is an error set on the provider. With GEOM resizing, class can become orphaned when it doesn't implement resize() method and the provider size decreases. Reviewed by: mav Sponsored by: FreeBSD Foundation
Diffstat (limited to 'sys/geom/geom_slice.c')
-rw-r--r--sys/geom/geom_slice.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/sys/geom/geom_slice.c b/sys/geom/geom_slice.c
index 8a49018..407afdc 100644
--- a/sys/geom/geom_slice.c
+++ b/sys/geom/geom_slice.c
@@ -522,10 +522,8 @@ g_slice_orphan(struct g_consumer *cp)
g_trace(G_T_TOPOLOGY, "g_slice_orphan(%p/%s)", cp, cp->provider->name);
g_topology_assert();
- KASSERT(cp->provider->error != 0,
- ("g_slice_orphan with error == 0"));
/* XXX: Not good enough we leak the softc and its suballocations */
g_slice_free(cp->geom->softc);
- g_wither_geom(cp->geom, cp->provider->error);
+ g_wither_geom(cp->geom, ENXIO);
}
OpenPOWER on IntegriCloud