From: Matthew Dillon Date: Tue, 2 Mar 2010 00:07:25 +0000 (-0800) Subject: kernel - VN - add missing disk_destroy() in module unload path X-Git-Tag: v2.7.0~114^2~21 X-Git-Url: https://gitweb.dragonflybsd.org/dragonfly.git/commitdiff_plain/f31d07d7c51000e06197074816ce13f92489a135 kernel - VN - add missing disk_destroy() in module unload path * The module unload was leaving the disk list corrupted. Add a missing disk_destroy() call. * Fixes certain bulk-build issues (apparently the bulk build tries to unload and reload the VN driver at some point for reasons unknown). --- diff --git a/sys/dev/disk/vn/vn.c b/sys/dev/disk/vn/vn.c index 014c1f8308..20ba9046b8 100644 --- a/sys/dev/disk/vn/vn.c +++ b/sys/dev/disk/vn/vn.c @@ -886,6 +886,7 @@ vn_modevent(module_t mod, int type, void *data) if (vn->sc_flags & VNF_INITED) vnclear(vn); /* Cleanup all cdev_t's that refer to this unit */ + disk_destroy(&vn->sc_disk); while ((dev = vn->sc_devlist) != NULL) { vn->sc_devlist = dev->si_drv2; dev->si_drv1 = dev->si_drv2 = NULL;