APP data lost after first R upgrade

Since the property ro.crypto.allow_encrypt_override wasn't set in Q
file data in SDcard mounted as internal storage is double encrypted.
So we need to revert the patch that skips encription if bio is
fscrypto or blk-crypto encrypted to avoid decryption errors.

Change-Id: Ic46973a092f00227e0fb2706788df4caa674607d
Signed-off-by: Luiz Cressoni <lutcho@motorola.com>
Reviewed-on: https://gerrit.mot.com/1952458
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Ling Jin <lingjin@motorola.com>
Submit-Approved: Jira Key
This commit is contained in:
Luiz Cressoni authored and Gilberto Gambugge committed 2023-06-01 00:47:14 -03:00
1 parent 9aca9b9d18
commit 3bb6b25343
1 file changed
+4 -3
+4 -3
View File
@@ -2879,16 +2879,17 @@ static int crypt_map(struct dm_target *ti, struct bio *bio)
* - for REQ_PREFLUSH device-mapper core ensures that no IO is in-flight
* - for REQ_OP_DISCARD caller must use flush if IO ordering matters
*/
// BEGIN IKSWR-71527 lutcho@motorola.com 2021/05/11
// bio_should_skip_dm_default_key(bio) reverted
if (unlikely(bio->bi_opf & REQ_PREFLUSH ||
bio_op(bio) == REQ_OP_DISCARD ||
bio_should_skip_dm_default_key(bio))) {
bio_op(bio) == REQ_OP_DISCARD )){
bio_set_dev(bio, cc->dev->bdev);
if (bio_sectors(bio))
bio->bi_iter.bi_sector = cc->start +
dm_target_offset(ti, bio->bi_iter.bi_sector);
return DM_MAPIO_REMAPPED;
}
// END IKSWR-71527
/*
* Check if bio is too large, split as needed.
*/