blk-integrity: register sysfs attributes on struct device
authorThomas Weißschuh <linux@weissschuh.net>
Sat, 18 Mar 2023 17:36:25 +0000 (17:36 +0000)
committerJens Axboe <axboe@kernel.dk>
Thu, 27 Apr 2023 00:22:50 +0000 (18:22 -0600)
commitff53cd52d9bdbf4074d2bbe9b591729997780bd3
tree4cf2070e086e6a00e4faf350ec0767f3c698cc43
parent76b8c319f02715e14abdbbbdd6508e83a1059bcc
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>
block/blk-integrity.c
block/blk.h
block/genhd.c
include/linux/blkdev.h