diff --git a/sys/geom/raid/tr_concat.c b/sys/geom/raid/tr_concat.c index 44951d444785..717ff1d56498 100644 --- a/sys/geom/raid/tr_concat.c +++ b/sys/geom/raid/tr_concat.c @@ -339,7 +339,7 @@ g_raid_tr_iodone_concat(struct g_raid_tr_object *tr, pbp->bio_inbed++; if (pbp->bio_children == pbp->bio_inbed) { pbp->bio_completed = pbp->bio_length; - g_raid_iodone(pbp, bp->bio_error); + g_raid_iodone(pbp, pbp->bio_error); } } diff --git a/sys/geom/raid/tr_raid5.c b/sys/geom/raid/tr_raid5.c index c90845e51376..4e958a050d20 100644 --- a/sys/geom/raid/tr_raid5.c +++ b/sys/geom/raid/tr_raid5.c @@ -371,15 +371,15 @@ g_raid_tr_iodone_raid5(struct g_raid_tr_object *tr, struct g_raid_subdisk *sd, struct bio *bp) { struct bio *pbp; - int error; pbp = bp->bio_parent; + if (pbp->bio_error == 0) + pbp->bio_error = bp->bio_error; pbp->bio_inbed++; - error = bp->bio_error; g_destroy_bio(bp); if (pbp->bio_children == pbp->bio_inbed) { pbp->bio_completed = pbp->bio_length; - g_raid_iodone(pbp, error); + g_raid_iodone(pbp, pbp->bio_error); } }