From 9eadc243239337fab9d26c066c61baac52e86580 Mon Sep 17 00:00:00 2001 From: phk Date: Thu, 26 Sep 2002 16:32:14 +0000 Subject: Make biowait() check bio_error before the BIO_ERROR flag, to propery catch internal GEOM use of bio_error. Sponsored by: DARPA & NAI Labs. --- sys/kern/vfs_bio.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'sys/kern') diff --git a/sys/kern/vfs_bio.c b/sys/kern/vfs_bio.c index 73303e2..25b9de0 100644 --- a/sys/kern/vfs_bio.c +++ b/sys/kern/vfs_bio.c @@ -2845,10 +2845,10 @@ biowait(struct bio *bp, const char *wchan) while ((bp->bio_flags & BIO_DONE) == 0) msleep(bp, NULL, PRIBIO, wchan, hz / 10); - if (!(bp->bio_flags & BIO_ERROR)) - return (0); if (bp->bio_error != 0) return (bp->bio_error); + if (!(bp->bio_flags & BIO_ERROR)) + return (0); return (EIO); } -- cgit v1.1