UPSTREAM: blk-crypto: move internal only declarations to blk-crypto-internal.h
blk_crypto_get_keyslot, blk_crypto_put_keyslot, __blk_crypto_evict_key and __blk_crypto_cfg_supported are only used internally by the blk-crypto code, so move the out of blk-crypto-profile.h, which is included by drivers that supply blk-crypto functionality. Signed-off-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Eric Biggers <ebiggers@google.com> Link: https://lore.kernel.org/r/20221114042944.1009870-4-hch@lst.de Signed-off-by: Jens Axboe <axboe@kernel.dk> (cherry picked from commit 3569788c08235c6f3e9e6ca724b2df44787ff487) Change-Id: I80b07a1c3b6e6f41ffe48adbdb27a3ca4480ff75 Signed-off-by: Eric Biggers <ebiggers@google.com>
This commit is contained in:
committed by
Eric Biggers
parent
9b46497fa7
commit
4909cb8714
@@ -66,6 +66,18 @@ static inline bool blk_crypto_rq_is_encrypted(struct request *rq)
|
|||||||
return rq->crypt_ctx;
|
return rq->crypt_ctx;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
blk_status_t blk_crypto_get_keyslot(struct blk_crypto_profile *profile,
|
||||||
|
const struct blk_crypto_key *key,
|
||||||
|
struct blk_crypto_keyslot **slot_ptr);
|
||||||
|
|
||||||
|
void blk_crypto_put_keyslot(struct blk_crypto_keyslot *slot);
|
||||||
|
|
||||||
|
int __blk_crypto_evict_key(struct blk_crypto_profile *profile,
|
||||||
|
const struct blk_crypto_key *key);
|
||||||
|
|
||||||
|
bool __blk_crypto_cfg_supported(struct blk_crypto_profile *profile,
|
||||||
|
const struct blk_crypto_config *cfg);
|
||||||
|
|
||||||
#else /* CONFIG_BLK_INLINE_ENCRYPTION */
|
#else /* CONFIG_BLK_INLINE_ENCRYPTION */
|
||||||
|
|
||||||
static inline int blk_crypto_sysfs_register(struct request_queue *q)
|
static inline int blk_crypto_sysfs_register(struct request_queue *q)
|
||||||
|
|||||||
@@ -159,18 +159,6 @@ int devm_blk_crypto_profile_init(struct device *dev,
|
|||||||
|
|
||||||
unsigned int blk_crypto_keyslot_index(struct blk_crypto_keyslot *slot);
|
unsigned int blk_crypto_keyslot_index(struct blk_crypto_keyslot *slot);
|
||||||
|
|
||||||
blk_status_t blk_crypto_get_keyslot(struct blk_crypto_profile *profile,
|
|
||||||
const struct blk_crypto_key *key,
|
|
||||||
struct blk_crypto_keyslot **slot_ptr);
|
|
||||||
|
|
||||||
void blk_crypto_put_keyslot(struct blk_crypto_keyslot *slot);
|
|
||||||
|
|
||||||
bool __blk_crypto_cfg_supported(struct blk_crypto_profile *profile,
|
|
||||||
const struct blk_crypto_config *cfg);
|
|
||||||
|
|
||||||
int __blk_crypto_evict_key(struct blk_crypto_profile *profile,
|
|
||||||
const struct blk_crypto_key *key);
|
|
||||||
|
|
||||||
void blk_crypto_reprogram_all_keys(struct blk_crypto_profile *profile);
|
void blk_crypto_reprogram_all_keys(struct blk_crypto_profile *profile);
|
||||||
|
|
||||||
void blk_crypto_profile_destroy(struct blk_crypto_profile *profile);
|
void blk_crypto_profile_destroy(struct blk_crypto_profile *profile);
|
||||||
|
|||||||
Reference in New Issue
Block a user