diff options
author | phk <phk@FreeBSD.org> | 2002-09-26 16:32:14 +0000 |
---|---|---|
committer | phk <phk@FreeBSD.org> | 2002-09-26 16:32:14 +0000 |
commit | 9eadc243239337fab9d26c066c61baac52e86580 (patch) | |
tree | 944880aa349f4ceeeeb848a8afb553ff5b82488a /sys/kern | |
parent | 541992031ae1933c4d93e3ce0cc22bda37bec1a6 (diff) | |
download | FreeBSD-src-9eadc243239337fab9d26c066c61baac52e86580.zip FreeBSD-src-9eadc243239337fab9d26c066c61baac52e86580.tar.gz |
Make biowait() check bio_error before the BIO_ERROR flag, to propery
catch internal GEOM use of bio_error.
Sponsored by: DARPA & NAI Labs.
Diffstat (limited to 'sys/kern')
-rw-r--r-- | sys/kern/vfs_bio.c | 4 |
1 files changed, 2 insertions, 2 deletions
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); } |