mirror of
https://github.com/linux-msm/laptops-kernel.git
synced 2026-08-13 14:19:53 -07:00
blk-crypto: Simplify check for fallback support
Since blk-crypto-fallback supports all blk_crypto_keys except wrapped keys, just check for that condition directly instead of using __blk_crypto_cfg_supported(). With this done, __blk_crypto_cfg_supported() is now used only for the hardware support. Reviewed-by: Christoph Hellwig <hch@lst.de> Link: https://patch.msgid.link/20260713023708.9245-2-ebiggers@kernel.org Signed-off-by: Eric Biggers <ebiggers@kernel.org>
This commit is contained in:
@@ -496,8 +496,7 @@ bool blk_crypto_fallback_bio_prep(struct bio *bio)
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!__blk_crypto_cfg_supported(blk_crypto_fallback_profile,
|
||||
&bc->bc_key->crypto_cfg)) {
|
||||
if (bc->bc_key->crypto_cfg.key_type != BLK_CRYPTO_KEY_TYPE_RAW) {
|
||||
bio_endio_status(bio, BLK_STS_NOTSUPP);
|
||||
return false;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user