block: manipulate bio->bi_flags through helpers
[cascardo/linux.git] / fs / buffer.c
index 1cf7a53..7887bb4 100644 (file)
@@ -2957,14 +2957,14 @@ sector_t generic_block_bmap(struct address_space *mapping, sector_t block,
 }
 EXPORT_SYMBOL(generic_block_bmap);
 
-static void end_bio_bh_io_sync(struct bio *bio, int err)
+static void end_bio_bh_io_sync(struct bio *bio)
 {
        struct buffer_head *bh = bio->bi_private;
 
-       if (unlikely (test_bit(BIO_QUIET,&bio->bi_flags)))
+       if (unlikely(bio_flagged(bio, BIO_QUIET)))
                set_bit(BH_Quiet, &bh->b_state);
 
-       bh->b_end_io(bh, test_bit(BIO_UPTODATE, &bio->bi_flags));
+       bh->b_end_io(bh, !bio->bi_error);
        bio_put(bio);
 }