mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-10 06:09:23 -04:00
Revert "dm verity: correcting logic used with corrupted_errs counter"
This reverts commit b649934e08.
Based on the upstream review comments its not advised to
ignore the block error and continue so reverting this .
Change-Id: Icf18bd5bdba96b396eee3ddff7e6d39a9bed5816
Signed-off-by: Ravi Kumar Siddojigari <rsiddoji@codeaurora.org>
This commit is contained in:
parent
33569a19db
commit
2a92b87a13
1 changed files with 3 additions and 7 deletions
|
|
@ -220,10 +220,8 @@ static int verity_handle_err(struct dm_verity *v, enum verity_block_type type,
|
|||
/* Corruption should be visible in device status in all modes */
|
||||
v->hash_failed = 1;
|
||||
|
||||
if (v->corrupted_errs >= DM_VERITY_MAX_CORRUPTED_ERRS) {
|
||||
DMERR("%s: reached maximum errors", v->data_dev->name);
|
||||
if (v->corrupted_errs >= DM_VERITY_MAX_CORRUPTED_ERRS)
|
||||
goto out;
|
||||
}
|
||||
|
||||
v->corrupted_errs++;
|
||||
|
||||
|
|
@ -241,16 +239,14 @@ static int verity_handle_err(struct dm_verity *v, enum verity_block_type type,
|
|||
DMERR_LIMIT("%s: %s block %llu is corrupted", v->data_dev->name,
|
||||
type_str, block);
|
||||
|
||||
if (v->corrupted_errs == DM_VERITY_MAX_CORRUPTED_ERRS)
|
||||
DMERR("%s: reached maximum errors", v->data_dev->name);
|
||||
|
||||
snprintf(verity_env, DM_VERITY_ENV_LENGTH, "%s=%d,%llu",
|
||||
DM_VERITY_ENV_VAR_NAME, type, block);
|
||||
|
||||
kobject_uevent_env(&disk_to_dev(dm_disk(md))->kobj, KOBJ_CHANGE, envp);
|
||||
|
||||
/* corrupted_errs count had not reached limits */
|
||||
return 0;
|
||||
|
||||
|
||||
out:
|
||||
if (v->mode == DM_VERITY_MODE_LOGGING)
|
||||
return 0;
|
||||
|
|
|
|||
Loading…
Reference in a new issue