[XFS] set b_error from bio error in xfs_buf_bio_end_io
authorLachlan McIlroy <lachlan@redback.melbourne.sgi.com>
Fri, 12 Dec 2008 04:27:25 +0000 (15:27 +1100)
committerLachlan McIlroy <lachlan@redback.melbourne.sgi.com>
Fri, 12 Dec 2008 04:27:25 +0000 (15:27 +1100)
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>
fs/xfs/linux-2.6/xfs_buf.c

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