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.
This commit is contained in:
Alexander Motin 2019-04-24 19:56:02 +00:00
parent f1498d7aa3
commit 9c498bd5c3
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=346644

View File

@ -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);
}