diff options
author | 2014-07-23 10:06:18 +0000 | |
---|---|---|
committer | 2014-07-23 10:06:18 +0000 | |
commit | f88331f57017f2b97386e2a6071165acd19d25fe (patch) | |
tree | 3f8ae2555eac0815554ca9470b89b30769a62e45 | |
parent | Subtraction usually decrements the value (diff) | |
download | wireguard-openbsd-f88331f57017f2b97386e2a6071165acd19d25fe.tar.xz wireguard-openbsd-f88331f57017f2b97386e2a6071165acd19d25fe.zip |
correctly drain and destroy the bufq upon detach
ok dlg@
-rw-r--r-- | sys/arch/octeon/dev/octcf.c | 5 |
1 files changed, 4 insertions, 1 deletions
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); |