Revert destroy_dev() to the state before destroy_dev_sched() was introduced.

Attempt to spawn destroy_dev_sched() from it causes inadmissible races.

Requested by:	tegge
Approved by:	re (kensmith)
This commit is contained in:
Konstantin Belousov 2007-07-05 13:04:59 +00:00
parent 36bc8661bf
commit 196a7385ac
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=171251

View File

@ -782,16 +782,10 @@ destroy_devl(struct cdev *dev)
void
destroy_dev(struct cdev *dev)
{
struct cdevsw *csw;
dev_lock();
csw = dev->si_devsw;
if ((csw != NULL && csw->d_purge != NULL) ||
dev->si_threadcount == 0) {
destroy_devl(dev);
dev_unlock_and_free();
} else
destroy_dev_sched_cbl(dev, NULL, NULL);
destroy_devl(dev);
dev_unlock_and_free();
}
const char *