UPSTREAM: blk-crypto: remove blk_crypto_unregister()

This function is trivial and is only used in one place.  Having this
function is misleading because it implies that blk_crypto_register()
needs to be paired with blk_crypto_unregister(), which is not the case.
Just set disk->queue->crypto_profile to NULL directly.

Signed-off-by: Eric Biggers <ebiggers@google.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Link: https://lore.kernel.org/r/20211124013733.347612-1-ebiggers@kernel.org
Signed-off-by: Jens Axboe <axboe@kernel.dk>
(cherry picked from commit 72cd9df2ef788d88c138d51223a01ca6281f232d)
Change-Id: Icf215db41f6b1cdc377f925b8150a47d62db18b8
This commit is contained in:
Eric Biggers
2021-11-23 17:37:33 -08:00
parent a573ddec5e
commit 23c9ecd9a3
3 changed files with 1 additions and 10 deletions

View File

@@ -1832,8 +1832,6 @@ static inline struct bio_vec *rq_integrity_vec(struct request *rq)
bool blk_crypto_register(struct blk_crypto_profile *profile,
struct request_queue *q);
void blk_crypto_unregister(struct request_queue *q);
#else /* CONFIG_BLK_INLINE_ENCRYPTION */
static inline bool blk_crypto_register(struct blk_crypto_profile *profile,
@@ -1842,8 +1840,6 @@ static inline bool blk_crypto_register(struct blk_crypto_profile *profile,
return true;
}
static inline void blk_crypto_unregister(struct request_queue *q) { }
#endif /* CONFIG_BLK_INLINE_ENCRYPTION */