]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/blobdiff - fs/ext4/readpage.c
block: add a bi_error field to struct bio
[mirror_ubuntu-bionic-kernel.git] / fs / ext4 / readpage.c
index ec3ef93a52dbbcf3c0f26680ce769890c56807f3..5de5b871c178ecd23c4029086f0ece149eb339c0 100644 (file)
@@ -98,7 +98,7 @@ static inline bool ext4_bio_encrypted(struct bio *bio)
  * status of that page is hard.  See end_buffer_async_read() for the details.
  * There is no point in duplicating all that complexity.
  */
-static void mpage_end_io(struct bio *bio, int err)
+static void mpage_end_io(struct bio *bio)
 {
        struct bio_vec *bv;
        int i;
@@ -106,7 +106,7 @@ static void mpage_end_io(struct bio *bio, int err)
        if (ext4_bio_encrypted(bio)) {
                struct ext4_crypto_ctx *ctx = bio->bi_private;
 
-               if (err) {
+               if (bio->bi_error) {
                        ext4_release_crypto_ctx(ctx);
                } else {
                        INIT_WORK(&ctx->r.work, completion_pages);
@@ -118,7 +118,7 @@ static void mpage_end_io(struct bio *bio, int err)
        bio_for_each_segment_all(bv, bio, i) {
                struct page *page = bv->bv_page;
 
-               if (!err) {
+               if (!bio->bi_error) {
                        SetPageUptodate(page);
                } else {
                        ClearPageUptodate(page);