From f31d07d7c51000e06197074816ce13f92489a135 Mon Sep 17 00:00:00 2001 From: Matthew Dillon Date: Mon, 1 Mar 2010 16:07:25 -0800 Subject: [PATCH] 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). --- sys/dev/disk/vn/vn.c | 1 + 1 file changed, 1 insertion(+) 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; -- 2.41.0