From 9c498bd5c362f0bb97b2526c3585062b96d92372 Mon Sep 17 00:00:00 2001 From: Alexander Motin Date: Wed, 24 Apr 2019 19:56:02 +0000 Subject: [PATCH] Call delist_dev() before destroy_dev_sched_cb(). destroy_dev_sched_cb() is excessively asynchronous, and during media change retaste new provider may appear sooner then device of the previous one get destroyed. MFC after: 1 week Sponsored by: iXsystems, Inc. --- sys/geom/geom_dev.c | 1 + 1 file changed, 1 insertion(+) diff --git a/sys/geom/geom_dev.c b/sys/geom/geom_dev.c index 47cad7d13a09..8c3b3a1c4bde 100644 --- a/sys/geom/geom_dev.c +++ b/sys/geom/geom_dev.c @@ -863,6 +863,7 @@ g_dev_orphan(struct g_consumer *cp) (void)clear_dumper(curthread); /* Destroy the struct cdev *so we get no more requests */ + delist_dev(dev); destroy_dev_sched_cb(dev, g_dev_callback, cp); }