]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/blobdiff - drivers/md/dm-io.c
block: add a bi_error field to struct bio
[mirror_ubuntu-artful-kernel.git] / drivers / md / dm-io.c
index 74adcd2c967ec8680d0cfd5c9d876c93074dbe10..efc6659f9d6a6c651d925c24aa6cb73c4453ee07 100644 (file)
@@ -134,12 +134,12 @@ static void dec_count(struct io *io, unsigned int region, int error)
                complete_io(io);
 }
 
-static void endio(struct bio *bio, int error)
+static void endio(struct bio *bio)
 {
        struct io *io;
        unsigned region;
 
-       if (error && bio_data_dir(bio) == READ)
+       if (bio->bi_error && bio_data_dir(bio) == READ)
                zero_fill_bio(bio);
 
        /*
@@ -149,7 +149,7 @@ static void endio(struct bio *bio, int error)
 
        bio_put(bio);
 
-       dec_count(io, region, error);
+       dec_count(io, region, bio->bi_error);
 }
 
 /*-----------------------------------------------------------------