summaryrefslogtreecommitdiffstats
path: root/sys/geom/geom_subr.c
diff options
context:
space:
mode:
authorphk <phk@FreeBSD.org>2003-03-23 23:01:40 +0000
committerphk <phk@FreeBSD.org>2003-03-23 23:01:40 +0000
commit8e76f1cefa385812b9d3e31763425ef47ea98298 (patch)
tree829eff49c4fa2f3f599d6677149a5861299d2c65 /sys/geom/geom_subr.c
parent3e8d794231fb21789419e92eeeb9c85d1c725ce6 (diff)
downloadFreeBSD-src-8e76f1cefa385812b9d3e31763425ef47ea98298.zip
FreeBSD-src-8e76f1cefa385812b9d3e31763425ef47ea98298.tar.gz
Introduce g_cancel_events() and use it a couple of places where it makes
sense.
Diffstat (limited to 'sys/geom/geom_subr.c')
-rw-r--r--sys/geom/geom_subr.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/sys/geom/geom_subr.c b/sys/geom/geom_subr.c
index b5c1861..f047b59 100644
--- a/sys/geom/geom_subr.c
+++ b/sys/geom/geom_subr.c
@@ -126,6 +126,7 @@ g_destroy_geom(struct g_geom *gp)
KASSERT(LIST_EMPTY(&gp->provider),
("g_destroy_geom(%s) with provider(s) [%p]",
gp->name, LIST_FIRST(&gp->consumer)));
+ g_cancel_event(NULL, gp, NULL, NULL);
LIST_REMOVE(gp, geom);
TAILQ_REMOVE(&geoms, gp, geoms);
g_free(gp->name);
@@ -162,6 +163,7 @@ g_destroy_consumer(struct g_consumer *cp)
KASSERT (cp->acr == 0, ("g_destroy_consumer with acr"));
KASSERT (cp->acw == 0, ("g_destroy_consumer with acw"));
KASSERT (cp->ace == 0, ("g_destroy_consumer with ace"));
+ g_cancel_event(NULL, NULL, NULL, cp);
LIST_REMOVE(cp, consumer);
devstat_remove_entry(cp->stat);
g_free(cp);
@@ -216,6 +218,7 @@ g_destroy_provider(struct g_provider *pp)
KASSERT (pp->acr == 0, ("g_destroy_provider with acr"));
KASSERT (pp->acw == 0, ("g_destroy_provider with acw"));
KASSERT (pp->acw == 0, ("g_destroy_provider with ace"));
+ g_cancel_event(NULL, NULL, pp, NULL);
g_nproviders--;
LIST_REMOVE(pp, provider);
gp = pp->geom;
OpenPOWER on IntegriCloud