Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/netbsd-3]: src/sys/dev Pull up revision 1.36 (requested by yamt in ticke...



details:   https://anonhg.NetBSD.org/src/rev/d1fa90c1f992
branches:  netbsd-3
changeset: 575137:d1fa90c1f992
user:      tron <tron%NetBSD.org@localhost>
date:      Wed Apr 06 11:56:55 2005 +0000

description:
Pull up revision 1.36 (requested by yamt in ticket #112):
introduce a function to drain bufq and use it where appropriate.

diffstat:

 sys/dev/ld.c |  15 +++++----------
 1 files changed, 5 insertions(+), 10 deletions(-)

diffs (44 lines):

diff -r 321db189780a -r d1fa90c1f992 sys/dev/ld.c
--- a/sys/dev/ld.c      Wed Apr 06 11:56:50 2005 +0000
+++ b/sys/dev/ld.c      Wed Apr 06 11:56:55 2005 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: ld.c,v 1.35 2005/02/27 00:26:58 perry Exp $    */
+/*     $NetBSD: ld.c,v 1.35.2.1 2005/04/06 11:56:55 tron Exp $ */
 
 /*-
  * Copyright (c) 1998, 2000 The NetBSD Foundation, Inc.
@@ -41,7 +41,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ld.c,v 1.35 2005/02/27 00:26:58 perry Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ld.c,v 1.35.2.1 2005/04/06 11:56:55 tron Exp $");
 
 #include "rnd.h"
 
@@ -201,7 +201,6 @@
 void
 ldenddetach(struct ld_softc *sc)
 {
-       struct buf *bp;
        int s, bmaj, cmaj, i, mn;
 
        if ((sc->sc_flags & LDF_ENABLED) == 0)
@@ -218,14 +217,10 @@
 
        /* Kill off any queued buffers. */
        s = splbio();
-       while ((bp = BUFQ_GET(&sc->sc_bufq)) != NULL) {
-               bp->b_error = EIO;
-               bp->b_flags |= B_ERROR;
-               bp->b_resid = bp->b_bcount;
-               biodone(bp);
-       }
+       bufq_drain(&sc->sc_bufq);
+       splx(s);
+
        bufq_free(&sc->sc_bufq);
-       splx(s);
 
        /* Nuke the vnodes for any open instances. */
        for (i = 0; i < MAXPARTITIONS; i++) {



Home | Main Index | Thread Index | Old Index