[patch 37/56] XFS: set b_error from bio error in xfs_buf_bio_end_io

Greg KH
2009-02-11T00:41:30Z

[-- Attachment #1: xfs-set-b_error-from-bio-error-in-xfs_buf_bio_end_io.patch --]
[-- Type: text/plain, Size: 946 bytes --]

2.6.27-stable review patch. If anyone has any objections, please let us know.
------------------

From: Lachlan McIlroy <lachlan@redback.melbourne.sgi.com>

commit cfbe52672fbc6f333892e8dde82c35e0a76aa5f5 upstream.

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>
Cc: Neil Brown <neilb@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

---
fs/xfs/linux-2.6/xfs_buf.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)

--- 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;