block: add a bi_error field to struct bio
[cascardo/linux.git] / fs / ocfs2 / cluster / heartbeat.c
index 16eff45..140de3c 100644 (file)
@@ -372,14 +372,13 @@ static void o2hb_wait_on_io(struct o2hb_region *reg,
        wait_for_completion(&wc->wc_io_complete);
 }
 
-static void o2hb_bio_end_io(struct bio *bio,
-                          int error)
+static void o2hb_bio_end_io(struct bio *bio)
 {
        struct o2hb_bio_wait_ctxt *wc = bio->bi_private;
 
-       if (error) {
-               mlog(ML_ERROR, "IO Error %d\n", error);
-               wc->wc_error = error;
+       if (bio->bi_error) {
+               mlog(ML_ERROR, "IO Error %d\n", bio->bi_error);
+               wc->wc_error = bio->bi_error;
        }
 
        o2hb_bio_wait_dec(wc, 1);