mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-11 07:03:09 -04:00
FROMLIST: dm-verity: skip verity_handle_error on I/O errors
If there is an I/O error and FEC correction fails, return an error instead of calling verity_handle_error(). Suggested-by: Sami Tolvanen <samitolvanen@google.com> Signed-off-by: Akilesh Kailash <akailash@google.com>. Bug: 197830746 Change-Id: Ie0f79b4dced50ce35904f8e63216d8d251f6caa8 Patch-mainline: lkml @ Mon, 13 Sep 2021 09:26 Signed-off-by: Sachin Grover <sgrover@codeaurora.org>
This commit is contained in:
parent
98d84ff1d6
commit
de6b7708bf
1 changed files with 11 additions and 2 deletions
|
|
@ -483,6 +483,7 @@ static int verity_verify_io(struct dm_verity_io *io)
|
|||
struct bvec_iter start;
|
||||
unsigned b;
|
||||
struct crypto_wait wait;
|
||||
struct bio *bio = dm_bio_from_per_bio_data(io, v->ti->per_io_data_size);
|
||||
|
||||
for (b = 0; b < io->n_blocks; b++) {
|
||||
int r;
|
||||
|
|
@ -537,9 +538,17 @@ static int verity_verify_io(struct dm_verity_io *io)
|
|||
else if (verity_fec_decode(v, io, DM_VERITY_BLOCK_TYPE_DATA,
|
||||
cur_block, NULL, &start) == 0)
|
||||
continue;
|
||||
else if (verity_handle_err(v, DM_VERITY_BLOCK_TYPE_DATA,
|
||||
else {
|
||||
if (bio->bi_status) {
|
||||
/*
|
||||
* Error correction failed; Just return error
|
||||
*/
|
||||
return -EIO;
|
||||
}
|
||||
if (verity_handle_err(v, DM_VERITY_BLOCK_TYPE_DATA,
|
||||
cur_block))
|
||||
return -EIO;
|
||||
return -EIO;
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
|
|
|||
Loading…
Reference in a new issue