|
@@ -1102,6 +1102,7 @@ static void crypt_endio(struct bio *clone)
|
|
|
struct dm_crypt_io *io = clone->bi_private;
|
|
|
struct crypt_config *cc = io->cc;
|
|
|
unsigned rw = bio_data_dir(clone);
|
|
|
+ int error;
|
|
|
|
|
|
/*
|
|
|
* free the processed pages
|
|
@@ -1109,15 +1110,16 @@ static void crypt_endio(struct bio *clone)
|
|
|
if (rw == WRITE)
|
|
|
crypt_free_buffer_pages(cc, clone);
|
|
|
|
|
|
+ error = clone->bi_error;
|
|
|
bio_put(clone);
|
|
|
|
|
|
- if (rw == READ && !clone->bi_error) {
|
|
|
+ if (rw == READ && !error) {
|
|
|
kcryptd_queue_crypt(io);
|
|
|
return;
|
|
|
}
|
|
|
|
|
|
- if (unlikely(clone->bi_error))
|
|
|
- io->error = clone->bi_error;
|
|
|
+ if (unlikely(error))
|
|
|
+ io->error = error;
|
|
|
|
|
|
crypt_dec_pending(io);
|
|
|
}
|