summaryrefslogtreecommitdiffstats
path: root/block/blk-crypto-internal.h
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2022-11-14 05:26:33 +0100
committerJens Axboe <axboe@kernel.dk>2022-11-30 11:09:00 -0700
commit450deb93df7d457cdd93594a1987f9650c749b96 (patch)
treedc95a82fad520ef1668c6262028c258aa3fb3720 /block/blk-crypto-internal.h
parentc62256dda37133a48d56cecc15e4a4d527d4cc46 (diff)
downloadlinux-stable-450deb93df7d457cdd93594a1987f9650c749b96.tar.gz
linux-stable-450deb93df7d457cdd93594a1987f9650c749b96.tar.bz2
linux-stable-450deb93df7d457cdd93594a1987f9650c749b96.zip
blk-crypto: pass a gendisk to blk_crypto_sysfs_{,un}register
Prepare for changes to the block layer sysfs handling by passing the readily available gendisk to blk_crypto_sysfs_{,un}register. Signed-off-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Eric Biggers <ebiggers@google.com> Link: https://lore.kernel.org/r/20221114042637.1009333-2-hch@lst.de Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'block/blk-crypto-internal.h')
-rw-r--r--block/blk-crypto-internal.h10
1 files changed, 6 insertions, 4 deletions
diff --git a/block/blk-crypto-internal.h b/block/blk-crypto-internal.h
index d31fa80454e4..a8cdaf26851e 100644
--- a/block/blk-crypto-internal.h
+++ b/block/blk-crypto-internal.h
@@ -21,9 +21,9 @@ extern const struct blk_crypto_mode blk_crypto_modes[];
#ifdef CONFIG_BLK_INLINE_ENCRYPTION
-int blk_crypto_sysfs_register(struct request_queue *q);
+int blk_crypto_sysfs_register(struct gendisk *disk);
-void blk_crypto_sysfs_unregister(struct request_queue *q);
+void blk_crypto_sysfs_unregister(struct gendisk *disk);
void bio_crypt_dun_increment(u64 dun[BLK_CRYPTO_DUN_ARRAY_SIZE],
unsigned int inc);
@@ -79,12 +79,14 @@ bool __blk_crypto_cfg_supported(struct blk_crypto_profile *profile,
#else /* CONFIG_BLK_INLINE_ENCRYPTION */
-static inline int blk_crypto_sysfs_register(struct request_queue *q)
+static inline int blk_crypto_sysfs_register(struct gendisk *disk)
{
return 0;
}
-static inline void blk_crypto_sysfs_unregister(struct request_queue *q) { }
+static inline void blk_crypto_sysfs_unregister(struct gendisk *disk)
+{
+}
static inline bool bio_crypt_rq_ctx_compatible(struct request *rq,
struct bio *bio)