From: Lachlan McIlroy Date: Fri, 12 Dec 2008 04:27:25 +0000 (+1100) Subject: XFS: set b_error from bio error in xfs_buf_bio_end_io X-Git-Tag: v2.6.28.5~9 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ed9b1d5568deee0f1f07205259fb37553fe18eff;p=thirdparty%2Fkernel%2Fstable.git XFS: set b_error from bio error in xfs_buf_bio_end_io commit cfbe52672fbc6f333892e8dde82c35e0a76aa5f5 upstream. Preserve any error returned by the bio layer. Reviewed-by: Eric Sandeen Reviewed-by: Tim Shimmin Signed-off-by: Lachlan McIlroy Cc: Neil Brown Signed-off-by: Greg Kroah-Hartman --- diff --git a/fs/xfs/linux-2.6/xfs_buf.c b/fs/xfs/linux-2.6/xfs_buf.c index 36d5fcd3f593d..8454dee16833b 100644 --- a/fs/xfs/linux-2.6/xfs_buf.c +++ b/fs/xfs/linux-2.6/xfs_buf.c @@ -1114,8 +1114,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;