diff options
author | Christoph Hellwig <hch@lst.de> | 2022-11-14 05:29:43 +0100 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2022-11-21 11:39:05 -0700 |
commit | 6715c98b6cf003f26b1b2f655393134e9d999a05 (patch) | |
tree | c8ff710f5c15c15dd8ed427d8e3b3d7bfba95787 /fs/crypto/inline_crypt.c | |
parent | fce3caea0f241f5d34855c82c399d5e0e2d91f07 (diff) | |
download | linux-stable-6715c98b6cf003f26b1b2f655393134e9d999a05.tar.gz linux-stable-6715c98b6cf003f26b1b2f655393134e9d999a05.tar.bz2 linux-stable-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 <hch@lst.de>
Reviewed-by: Eric Biggers <ebiggers@google.com>
Link: https://lore.kernel.org/r/20221114042944.1009870-3-hch@lst.de
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'fs/crypto/inline_crypt.c')
-rw-r--r-- | fs/crypto/inline_crypt.c | 6 |
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); |