diff options
author | phk <phk@FreeBSD.org> | 2003-05-01 19:24:00 +0000 |
---|---|---|
committer | phk <phk@FreeBSD.org> | 2003-05-01 19:24:00 +0000 |
commit | 2ae9241429ba97c50016aa5adcd059de32e2eef1 (patch) | |
tree | d036538791d2c7d7e0073464919571b1d0c936a7 /sys/geom | |
parent | a7b4d9f21f59d6dce9380246b00ed5602ab221b9 (diff) | |
download | FreeBSD-src-2ae9241429ba97c50016aa5adcd059de32e2eef1.zip FreeBSD-src-2ae9241429ba97c50016aa5adcd059de32e2eef1.tar.gz |
When events on a reference is cancelled, check our doorstep first,
it might be an orphan.
Diffstat (limited to 'sys/geom')
-rw-r--r-- | sys/geom/geom_event.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/sys/geom/geom_event.c b/sys/geom/geom_event.c index 0add6cf..c0ec8e1 100644 --- a/sys/geom/geom_event.c +++ b/sys/geom/geom_event.c @@ -210,9 +210,16 @@ void g_cancel_event(void *ref) { struct g_event *ep, *epn; + struct g_provider *pp; u_int n; mtx_lock(&g_eventlock); + TAILQ_FOREACH(pp, &g_doorstep, orphan) { + if (pp != ref) + continue; + TAILQ_REMOVE(&g_doorstep, pp, orphan); + break; + } for (ep = TAILQ_FIRST(&g_events); ep != NULL; ep = epn) { epn = TAILQ_NEXT(ep, events); for (n = 0; n < G_N_EVENTREFS; n++) { |