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.103 (requested by yamt in tick...
details: https://anonhg.NetBSD.org/src/rev/dad028618e8c
branches: netbsd-3
changeset: 575142:dad028618e8c
user: tron <tron%NetBSD.org@localhost>
date: Wed Apr 06 11:57:27 2005 +0000
description:
Pull up revision 1.103 (requested by yamt in ticket #112):
introduce a function to drain bufq and use it where appropriate.
diffstat:
sys/dev/ccd.c | 12 +++---------
1 files changed, 3 insertions(+), 9 deletions(-)
diffs (40 lines):
diff -r e69cba7da4c5 -r dad028618e8c sys/dev/ccd.c
--- a/sys/dev/ccd.c Wed Apr 06 11:57:20 2005 +0000
+++ b/sys/dev/ccd.c Wed Apr 06 11:57:27 2005 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ccd.c,v 1.102 2005/02/27 00:26:58 perry Exp $ */
+/* $NetBSD: ccd.c,v 1.102.2.1 2005/04/06 11:57:27 tron Exp $ */
/*-
* Copyright (c) 1996, 1997, 1998, 1999 The NetBSD Foundation, Inc.
@@ -125,7 +125,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ccd.c,v 1.102 2005/02/27 00:26:58 perry Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ccd.c,v 1.102.2.1 2005/04/06 11:57:27 tron Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -984,7 +984,6 @@
int unit = ccdunit(dev);
int s, i, j, lookedup = 0, error;
int part, pmask;
- struct buf *bp;
struct ccd_softc *cs;
struct ccd_ioctl *ccio = (struct ccd_ioctl *)data;
struct ucred *uc;
@@ -1155,12 +1154,7 @@
/* Kill off any queued buffers. */
s = splbio();
- while ((bp = BUFQ_GET(&cs->sc_bufq)) != NULL) {
- bp->b_error = EIO;
- bp->b_flags |= B_ERROR;
- bp->b_resid = bp->b_bcount;
- biodone(bp);
- }
+ bufq_drain(&cs->sc_bufq);
splx(s);
bufq_free(&cs->sc_bufq);
Home |
Main Index |
Thread Index |
Old Index