Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/netbsd-3]: src/sys/dev/scsipi Pull up revision 1.221 (requested by yamt ...
details: https://anonhg.NetBSD.org/src/rev/321db189780a
branches: netbsd-3
changeset: 575136:321db189780a
user: tron <tron%NetBSD.org@localhost>
date: Wed Apr 06 11:56:50 2005 +0000
description:
Pull up revision 1.221 (requested by yamt in ticket #112):
introduce a function to drain bufq and use it where appropriate.
diffstat:
sys/dev/scsipi/cd.c | 12 +++---------
1 files changed, 3 insertions(+), 9 deletions(-)
diffs (40 lines):
diff -r 626f1fc247ef -r 321db189780a sys/dev/scsipi/cd.c
--- a/sys/dev/scsipi/cd.c Wed Apr 06 11:56:43 2005 +0000
+++ b/sys/dev/scsipi/cd.c Wed Apr 06 11:56:50 2005 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: cd.c,v 1.220 2005/02/27 00:27:48 perry Exp $ */
+/* $NetBSD: cd.c,v 1.220.2.1 2005/04/06 11:56:50 tron Exp $ */
/*-
* Copyright (c) 1998, 2001, 2003, 2004 The NetBSD Foundation, Inc.
@@ -54,7 +54,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: cd.c,v 1.220 2005/02/27 00:27:48 perry Exp $");
+__KERNEL_RCSID(0, "$NetBSD: cd.c,v 1.220.2.1 2005/04/06 11:56:50 tron Exp $");
#include "rnd.h"
@@ -290,7 +290,6 @@
cddetach(struct device *self, int flags)
{
struct cd_softc *cd = (struct cd_softc *) self;
- struct buf *bp;
int s, bmaj, cmaj, i, mn;
/* locate the major number */
@@ -310,12 +309,7 @@
s = splbio();
/* Kill off any queued buffers. */
- while ((bp = BUFQ_GET(&cd->buf_queue)) != NULL) {
- bp->b_error = EIO;
- bp->b_flags |= B_ERROR;
- bp->b_resid = bp->b_bcount;
- biodone(bp);
- }
+ bufq_drain(&cd->buf_queue);
bufq_free(&cd->buf_queue);
Home |
Main Index |
Thread Index |
Old Index