Index: geom.h =================================================================== RCS file: /private/FreeBSD/src/sys/geom/geom.h,v retrieving revision 1.83 diff -u -p -r1.83 geom.h --- geom.h 21 Jun 2004 20:31:49 -0000 1.83 +++ geom.h 27 Jun 2004 12:45:21 -0000 @@ -120,6 +120,7 @@ struct g_geom { void *softc; unsigned flags; #define G_GEOM_WITHER 1 +#define G_GEOM_WITHERING 2 }; /* Index: geom_subr.c =================================================================== RCS file: /private/FreeBSD/src/sys/geom/geom_subr.c,v retrieving revision 1.75 diff -u -p -r1.75 geom_subr.c --- geom_subr.c 18 Mar 2004 07:17:10 -0000 1.75 +++ geom_subr.c 27 Jun 2004 12:50:40 -0000 @@ -265,13 +265,12 @@ g_wither_geom(struct g_geom *gp, int err { struct g_provider *pp, *pp2; struct g_consumer *cp, *cp2; - static int once_is_enough; g_topology_assert(); G_VALID_GEOM(gp); - if (once_is_enough) + if (gp->flags & G_GEOM_WITHERING) return; - once_is_enough = 1; + gp->flags |= G_GEOM_WITHERING; g_trace(G_T_TOPOLOGY, "g_wither_geom(%p(%s))", gp, gp->name); if (!(gp->flags & G_GEOM_WITHER)) { gp->flags |= G_GEOM_WITHER; @@ -294,7 +293,8 @@ g_wither_geom(struct g_geom *gp, int err } if (LIST_EMPTY(&gp->provider) && LIST_EMPTY(&gp->consumer)) g_destroy_geom(gp); - once_is_enough = 0; + else + gp->flags &= ~G_GEOM_WITHERING; } struct g_consumer *