summaryrefslogtreecommitdiff
path: root/block
diff options
context:
space:
mode:
authorEric Biggers <ebiggers@kernel.org>2026-07-12 22:36:52 -0400
committerEric Biggers <ebiggers@kernel.org>2026-07-20 10:39:25 -0700
commita90d760d572c37417db157901dc5c22a774048e9 (patch)
tree59a222ad21839535055986659bb8c61a06ece116 /block
parentdbca1290258ff20b5742a3a3e294fc95df941939 (diff)
downloadlinux-next-a90d760d572c37417db157901dc5c22a774048e9.tar.gz
linux-next-a90d760d572c37417db157901dc5c22a774048e9.zip
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>
Diffstat (limited to 'block')
-rw-r--r--block/blk-crypto-fallback.c3
1 files changed, 1 insertions, 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
@@ -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;
}