Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit afea5840 authored by Jaegeuk Kim's avatar Jaegeuk Kim Committed by Neeraj Soni
Browse files

dm-default-key: fix wrong encryption/decryption when f2fs moves blocks



commit 2b425b7413e2 ("dm-default-key, f2fs, ICE: support dm-default-key with f2fs/ICE")

supports bio->bi_crypt_skip, so this patch should address the original issue by
adding this condition.

Change-Id: I215cd9d02e364af07eebf388000809cdf0cce472
Signed-off-by: default avatarJaegeuk Kim <jaegeuk@google.com>
Signed-off-by: default avatarShivaprasad Hongal <shongal@codeaurora.org>
Signed-off-by: default avatarNeeraj Soni <neersoni@codeaurora.org>
parent 3033ca13
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -133,7 +133,7 @@ static int default_key_map(struct dm_target *ti, struct bio *bio)
			dm_target_offset(ti, bio->bi_iter.bi_sector);
			dm_target_offset(ti, bio->bi_iter.bi_sector);
	}
	}


	if (!bio->bi_crypt_key)
	if (!bio->bi_crypt_key && !bio->bi_crypt_skip)
		bio->bi_crypt_key = &dkc->key;
		bio->bi_crypt_key = &dkc->key;


	return DM_MAPIO_REMAPPED;
	return DM_MAPIO_REMAPPED;