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

Commit cad5c55d authored by qctecmdr's avatar qctecmdr Committed by Gerrit - the friendly Code Review server
Browse files

Merge "dm-crypt: Skip encryption if bio is fscrypto or blk-crypto encrypted"

parents 9baff609 a5834e84
Loading
Loading
Loading
Loading
+2 −1
Original line number Original line Diff line number Diff line
@@ -2880,7 +2880,8 @@ static int crypt_map(struct dm_target *ti, struct bio *bio)
	 * - for REQ_OP_DISCARD caller must use flush if IO ordering matters
	 * - for REQ_OP_DISCARD caller must use flush if IO ordering matters
	 */
	 */
	if (unlikely(bio->bi_opf & REQ_PREFLUSH ||
	if (unlikely(bio->bi_opf & REQ_PREFLUSH ||
	    bio_op(bio) == REQ_OP_DISCARD)) {
	    bio_op(bio) == REQ_OP_DISCARD ||
	    bio_should_skip_dm_default_key(bio))) {
		bio_set_dev(bio, cc->dev->bdev);
		bio_set_dev(bio, cc->dev->bdev);
		if (bio_sectors(bio))
		if (bio_sectors(bio))
			bio->bi_iter.bi_sector = cc->start +
			bio->bi_iter.bi_sector = cc->start +