summaryrefslogtreecommitdiff
path: root/sys/dev/raidframe
diff options
context:
space:
mode:
authormlelstv <mlelstv@NetBSD.org>2016-01-05 17:03:53 +0000
committermlelstv <mlelstv@NetBSD.org>2016-01-05 17:03:53 +0000
commitfd384f888b6ce51a1b33f68cbbccfe5cbc17722c (patch)
tree7589249d8b664fbd98f0c2b20acbb6f9d54591ec /sys/dev/raidframe
parent1bef88ba6f588a2e9407760a45107faef36c1467 (diff)
handle possible errors from bdev_strategy.
Diffstat (limited to 'sys/dev/raidframe')
-rw-r--r--sys/dev/raidframe/rf_netbsdkintf.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/sys/dev/raidframe/rf_netbsdkintf.c b/sys/dev/raidframe/rf_netbsdkintf.c
index 7f23ccc59ac..b5639854d06 100644
--- a/sys/dev/raidframe/rf_netbsdkintf.c
+++ b/sys/dev/raidframe/rf_netbsdkintf.c
@@ -1,4 +1,4 @@
-/* $NetBSD: rf_netbsdkintf.c,v 1.337 2016/01/04 13:15:17 mlelstv Exp $ */
+/* $NetBSD: rf_netbsdkintf.c,v 1.338 2016/01/05 17:03:53 mlelstv Exp $ */
/*-
* Copyright (c) 1996, 1997, 1998, 2008-2011 The NetBSD Foundation, Inc.
@@ -101,7 +101,7 @@
***********************************************************/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: rf_netbsdkintf.c,v 1.337 2016/01/04 13:15:17 mlelstv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: rf_netbsdkintf.c,v 1.338 2016/01/05 17:03:53 mlelstv Exp $");
#ifdef _KERNEL_OPT
#include "opt_compat_netbsd.h"
@@ -2323,7 +2323,9 @@ raidread_component_area(dev_t dev, struct vnode *b_vp, void *data,
bp->b_resid = dsize;
bdev_strategy(bp);
- error = biowait(bp);
+ error = bp->b_error;
+ if (!error)
+ error = biowait(bp);
if (!error) {
memcpy(data, bp->b_data, msize);
@@ -2368,7 +2370,9 @@ raidwrite_component_area(dev_t dev, struct vnode *b_vp, void *data,
bdev_strategy(bp);
if (asyncp)
return 0;
- error = biowait(bp);
+ error = bp->b_error;
+ if (!error)
+ error = biowait(bp);
brelse(bp, 0);
if (error) {
#if 1