From f88331f57017f2b97386e2a6071165acd19d25fe Mon Sep 17 00:00:00 2001 From: jasper Date: Wed, 23 Jul 2014 10:06:18 +0000 Subject: [PATCH] correctly drain and destroy the bufq upon detach ok dlg@ --- sys/arch/octeon/dev/octcf.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/sys/arch/octeon/dev/octcf.c b/sys/arch/octeon/dev/octcf.c index 3150065face..cc842e28aae 100644 --- a/sys/arch/octeon/dev/octcf.c +++ b/sys/arch/octeon/dev/octcf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: octcf.c,v 1.23 2014/07/22 17:26:03 jasper Exp $ */ +/* $OpenBSD: octcf.c,v 1.24 2014/07/23 10:06:18 jasper Exp $ */ /* $NetBSD: wd.c,v 1.193 1999/02/28 17:15:27 explorer Exp $ */ /* @@ -274,9 +274,12 @@ octcfdetach(struct device *self, int flags) { struct octcf_softc *sc = (struct octcf_softc *)self; + bufq_drain(&sc->sc_bufq); + disk_gone(octcfopen, self->dv_unit); /* Detach disk. */ + bufq_destroy(&sc->sc_bufq); disk_detach(&sc->sc_dk); return (0); -- 2.20.1