[PATCH 01/16] blk-crypto: Simplify check for fallback support
Eric Biggers <[email protected]> Tue, 23 Jun 2026 22:03:19 -0700
| Newsgroups | org.kernel.vger.linux-fscrypt,net.sourceforge.lists.linux-f2fs-devel,org.kernel.vger.linux-block,org.kernel.vger.linux-ext4,org.kernel.vger.linux-fsdevel |
|---|---|
| Message-ID | <[email protected]> |
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. Signed-off-by: Eric Biggers <[email protected]> --- block/blk-crypto-fallback.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/block/blk-crypto-fallback.c b/block/blk-crypto-fallback.c index 2a5c52ab74b4..2a8f40a65158 100644 --- a/block/blk-crypto-fallback.c +++ b/block/blk-crypto-fallback.c @@ -494,12 +494,11 @@ bool blk_crypto_fallback_bio_prep(struct bio *bio) /* User didn't call blk_crypto_start_using_key() first */ bio_io_error(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; } if (bio_data_dir(bio) == WRITE) { -- 2.54.0