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

Commit 1aa7229f authored by Jaegeuk Kim's avatar Jaegeuk Kim Committed by Gerrit - the friendly Code Review server
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>
parent af4ef71b
Loading
Loading
Loading
Loading
+1 −1
Original line number 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);
	}

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

	return DM_MAPIO_REMAPPED;