aboutsummaryrefslogtreecommitdiffstats
path: root/fs/crypto/inline_crypt.c
diff options
context:
space:
mode:
authorChristoph Hellwig <[email protected]>2022-11-14 04:29:43 +0000
committerJens Axboe <[email protected]>2022-11-21 18:39:05 +0000
commit6715c98b6cf003f26b1b2f655393134e9d999a05 (patch)
treec8ff710f5c15c15dd8ed427d8e3b3d7bfba95787 /fs/crypto/inline_crypt.c
parentblk-crypto: don't use struct request_queue for public interfaces (diff)
downloadkernel-6715c98b6cf003f26b1b2f655393134e9d999a05.tar.gz
kernel-6715c98b6cf003f26b1b2f655393134e9d999a05.zip
blk-crypto: add a blk_crypto_config_supported_natively helper
Add a blk_crypto_config_supported_natively helper that wraps __blk_crypto_cfg_supported to retrieve the crypto_profile from the request queue. With this fscrypt can stop including blk-crypto-profile.h and rely on the public consumer interface in blk-crypto.h. Signed-off-by: Christoph Hellwig <[email protected]> Reviewed-by: Eric Biggers <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Jens Axboe <[email protected]>
Diffstat (limited to 'fs/crypto/inline_crypt.c')
-rw-r--r--fs/crypto/inline_crypt.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/fs/crypto/inline_crypt.c b/fs/crypto/inline_crypt.c
index 55c4d8c23d30..8bfb3ce86476 100644
--- a/fs/crypto/inline_crypt.c
+++ b/fs/crypto/inline_crypt.c
@@ -12,7 +12,7 @@
* provides the key and IV to use.
*/
-#include <linux/blk-crypto-profile.h>
+#include <linux/blk-crypto.h>
#include <linux/blkdev.h>
#include <linux/buffer_head.h>
#include <linux/sched/mm.h>
@@ -77,10 +77,8 @@ static void fscrypt_log_blk_crypto_impl(struct fscrypt_mode *mode,
unsigned int i;
for (i = 0; i < num_devs; i++) {
- struct request_queue *q = bdev_get_queue(devs[i]);
-
if (!IS_ENABLED(CONFIG_BLK_INLINE_ENCRYPTION_FALLBACK) ||
- __blk_crypto_cfg_supported(q->crypto_profile, cfg)) {
+ blk_crypto_config_supported_natively(devs[i], cfg)) {
if (!xchg(&mode->logged_blk_crypto_native, 1))
pr_info("fscrypt: %s using blk-crypto (native)\n",
mode->friendly_name);