From ad624005b3db69af8eeff9aff3eb073f114d96fb Mon Sep 17 00:00:00 2001 From: Edward Tomasz Napierala Date: Sat, 7 Jul 2012 17:09:44 +0000 Subject: 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 --- sys/geom/uzip/g_uzip.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'sys/geom/uzip/g_uzip.c') diff --git a/sys/geom/uzip/g_uzip.c b/sys/geom/uzip/g_uzip.c index f19e14c60a88..03272115edb9 100644 --- a/sys/geom/uzip/g_uzip.c +++ b/sys/geom/uzip/g_uzip.c @@ -313,13 +313,11 @@ g_uzip_orphan(struct g_consumer *cp) g_trace(G_T_TOPOLOGY, "g_uzip_orphan(%p/%s)", cp, cp->provider->name); g_topology_assert(); - KASSERT(cp->provider->error != 0, - ("g_uzip_orphan with error == 0")); gp = cp->geom; g_uzip_softc_free(gp->softc, gp); gp->softc = NULL; - g_wither_geom(gp, cp->provider->error); + g_wither_geom(gp, ENXIO); } static int -- cgit v1.2.3