aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/block/blk.h
diff options
context:
space:
mode:
authorThomas Weißschuh <linux@weissschuh.net>2023-03-18 17:36:25 +0000
committerJens Axboe <axboe@kernel.dk>2023-04-26 18:22:50 -0600
commitff53cd52d9bdbf4074d2bbe9b591729997780bd3 (patch)
tree4cf2070e086e6a00e4faf350ec0767f3c698cc43 /block/blk.h
parentblk-integrity: convert to struct device_attribute (diff)
downloadwireguard-linux-ff53cd52d9bdbf4074d2bbe9b591729997780bd3.tar.xz
wireguard-linux-ff53cd52d9bdbf4074d2bbe9b591729997780bd3.zip
blk-integrity: register sysfs attributes on struct device
The "integrity" kobject only acted as a holder for static sysfs entries. It also was embedded into struct gendisk without managing it, violating assumptions of the driver core. Instead register the sysfs entries directly onto the struct device. Also drop the now unused member integrity_kobj from struct gendisk. Suggested-by: Christoph Hellwig <hch@infradead.org> Signed-off-by: Thomas Weißschuh <linux@weissschuh.net> Reviewed-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Martin K. Petersen <martin.petersen@oracle.com> Link: https://lore.kernel.org/r/20230309-kobj_release-gendisk_integrity-v3-3-ceccb4493c46@weissschuh.net Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'block/blk.h')
-rw-r--r--block/blk.h10
1 files changed, 1 insertions, 9 deletions
diff --git a/block/blk.h b/block/blk.h
index 564119a76bc5..45547bcf1119 100644
--- a/block/blk.h
+++ b/block/blk.h
@@ -214,8 +214,7 @@ static inline bool integrity_req_gap_front_merge(struct request *req,
bip_next->bip_vec[0].bv_offset);
}
-int blk_integrity_add(struct gendisk *disk);
-void blk_integrity_del(struct gendisk *);
+extern const struct attribute_group blk_integrity_attr_group;
#else /* CONFIG_BLK_DEV_INTEGRITY */
static inline bool blk_integrity_merge_rq(struct request_queue *rq,
struct request *r1, struct request *r2)
@@ -248,13 +247,6 @@ static inline bool bio_integrity_endio(struct bio *bio)
static inline void bio_integrity_free(struct bio *bio)
{
}
-static inline int blk_integrity_add(struct gendisk *disk)
-{
- return 0;
-}
-static inline void blk_integrity_del(struct gendisk *disk)
-{
-}
#endif /* CONFIG_BLK_DEV_INTEGRITY */
unsigned long blk_rq_timeout(unsigned long timeout);