Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/ata struct buf::b_iodone is not called at splbio() a...
details: https://anonhg.NetBSD.org/src/rev/81c36b029e2a
branches: trunk
changeset: 751069:81c36b029e2a
user: bouyer <bouyer%NetBSD.org@localhost>
date: Sat Jan 23 18:54:53 2010 +0000
description:
struct buf::b_iodone is not called at splbio() any more.
Make sure non-MPsafe iodone callbacks raise the SPL as appropriate.
diffstat:
sys/dev/ata/wd.c | 9 +++++++--
1 files changed, 7 insertions(+), 2 deletions(-)
diffs (46 lines):
diff -r 26d56373442f -r 81c36b029e2a sys/dev/ata/wd.c
--- a/sys/dev/ata/wd.c Sat Jan 23 18:31:04 2010 +0000
+++ b/sys/dev/ata/wd.c Sat Jan 23 18:54:53 2010 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: wd.c,v 1.382 2010/01/19 22:28:31 pooka Exp $ */
+/* $NetBSD: wd.c,v 1.383 2010/01/23 18:54:53 bouyer Exp $ */
/*
* Copyright (c) 1998, 2001 Manuel Bouyer. All rights reserved.
@@ -54,7 +54,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: wd.c,v 1.382 2010/01/19 22:28:31 pooka Exp $");
+__KERNEL_RCSID(0, "$NetBSD: wd.c,v 1.383 2010/01/23 18:54:53 bouyer Exp $");
#include "opt_ata.h"
@@ -595,6 +595,7 @@
struct buf *obp = bp->b_private;
struct wd_softc *sc =
device_lookup_private(&wd_cd, DISKUNIT(obp->b_dev));
+ int s;
if (__predict_false(bp->b_error != 0)) {
/*
@@ -623,15 +624,19 @@
bp->b_data = (char *)bp->b_data + bp->b_bcount;
bp->b_blkno += (bp->b_bcount / 512);
bp->b_rawblkno += (bp->b_bcount / 512);
+ s = splbio();
wdstart1(sc, bp);
+ splx(s);
return;
done:
obp->b_error = bp->b_error;
obp->b_resid = bp->b_resid;
+ s = splbio();
putiobuf(bp);
biodone(obp);
sc->openings++;
+ splx(s);
/* wddone() will call wdstart() */
}
Home |
Main Index |
Thread Index |
Old Index