diff options
| author | Thomas Weißschuh <linux@weissschuh.net> | 2024-10-02 17:01:22 +0300 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2024-10-17 16:11:33 +0300 |
| commit | 09e829b39b43915fc58e1819da4d276f603f0521 (patch) | |
| tree | 4ce189d43dc4f78e36d8f667230363e9746c0cd1 /include/linux | |
| parent | 6356f2d2fc7309c2a132fb9dd87343bcd5794efb (diff) | |
| download | linux-09e829b39b43915fc58e1819da4d276f603f0521.tar.xz | |
blk-integrity: register sysfs attributes on struct device
Upstream commit ff53cd52d9bdbf4074d2bbe9b591729997780bd3.
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>
[cascardo: conflict because of constification of integrity_ktype]
[cascardo: struct gendisk is defined at include/linux/genhd.h]
[cascardo: there is no blk_trace_attr_group]
Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@igalia.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/genhd.h | 3 |
1 files changed, 0 insertions, 3 deletions
diff --git a/include/linux/genhd.h b/include/linux/genhd.h index 690b7f7996d1..3f49a3a30e9b 100644 --- a/include/linux/genhd.h +++ b/include/linux/genhd.h @@ -144,9 +144,6 @@ struct gendisk { struct timer_rand_state *random; atomic_t sync_io; /* RAID */ struct disk_events *ev; -#ifdef CONFIG_BLK_DEV_INTEGRITY - struct kobject integrity_kobj; -#endif /* CONFIG_BLK_DEV_INTEGRITY */ #if IS_ENABLED(CONFIG_CDROM) struct cdrom_device_info *cdi; #endif |
