[XFS] set b_error from bio error in xfs_buf_bio_end_io

Preserve any error returned by the bio layer.

Reviewed-by: Eric Sandeen <sandeen@sandeen.net>
Reviewed-by: Tim Shimmin <tes@sgi.com>
Signed-off-by: Lachlan McIlroy <lachlan@sgi.com>
This commit is contained in:
Lachlan McIlroy 2008-12-12 15:27:25 +11:00
parent 14d676f56f
commit cfbe52672f

View file

@ -1126,8 +1126,7 @@ xfs_buf_bio_end_io(
unsigned int blocksize = bp->b_target->bt_bsize; unsigned int blocksize = bp->b_target->bt_bsize;
struct bio_vec *bvec = bio->bi_io_vec + bio->bi_vcnt - 1; struct bio_vec *bvec = bio->bi_io_vec + bio->bi_vcnt - 1;
if (!test_bit(BIO_UPTODATE, &bio->bi_flags)) xfs_buf_ioerror(bp, -error);
bp->b_error = EIO;
do { do {
struct page *page = bvec->bv_page; struct page *page = bvec->bv_page;