1
0
mirror of https://git.FreeBSD.org/src.git synced 2025-01-16 15:11:52 +00:00

Make biowait() check bio_error before the BIO_ERROR flag, to propery

catch internal GEOM use of bio_error.

Sponsored by:	DARPA & NAI Labs.
This commit is contained in:
Poul-Henning Kamp 2002-09-26 16:32:14 +00:00
parent c2aee6b42d
commit 089cf428da
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=104008

View File

@ -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);
}