From bfc37a5112038f34125fd01633e6718dbf3fe6bf Mon Sep 17 00:00:00 2001 From: Poul-Henning Kamp Date: Sat, 14 Feb 2004 17:58:57 +0000 Subject: [PATCH] Add a KASSERT which checks that a class never fails a closing ->access() call. --- sys/geom/geom_subr.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/sys/geom/geom_subr.c b/sys/geom/geom_subr.c index b6a9c7f34588..69a972d9448a 100644 --- a/sys/geom/geom_subr.c +++ b/sys/geom/geom_subr.c @@ -627,6 +627,9 @@ g_access(struct g_consumer *cp, int dcr, int dcw, int dce) /* Ok then... */ error = pp->geom->access(pp, dcr, dcw, dce); + KASSERT(dcr > 0 || dcw > 0 || dce > 0 || error == 0, + ("Geom provider %s::%s failed closing ->access()", + pp->geom->class->name, pp->name)); if (!error) { /* * If we open first write, spoil any partner consumers.