fscrypt: stop using PG_error to track error status
[linux-2.6-microblaze.git] / fs / ext4 / readpage.c
index e02a5f1..3d21eae 100644 (file)
@@ -75,7 +75,7 @@ static void __read_end_io(struct bio *bio)
        bio_for_each_segment_all(bv, bio, iter_all) {
                page = bv->bv_page;
 
-               /* PG_error was set if any post_read step failed */
+               /* PG_error was set if verity failed. */
                if (bio->bi_status || PageError(page)) {
                        ClearPageUptodate(page);
                        /* will re-read again later */
@@ -96,10 +96,12 @@ static void decrypt_work(struct work_struct *work)
 {
        struct bio_post_read_ctx *ctx =
                container_of(work, struct bio_post_read_ctx, work);
+       struct bio *bio = ctx->bio;
 
-       fscrypt_decrypt_bio(ctx->bio);
-
-       bio_post_read_processing(ctx);
+       if (fscrypt_decrypt_bio(bio))
+               bio_post_read_processing(ctx);
+       else
+               __read_end_io(bio);
 }
 
 static void verity_work(struct work_struct *work)