]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
blk-integrity: register sysfs attributes on struct device
authorThomas Weißschuh <linux@weissschuh.net>
Wed, 2 Oct 2024 14:01:22 +0000 (11:01 -0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 17 Oct 2024 13:11:33 +0000 (15:11 +0200)
commit09e829b39b43915fc58e1819da4d276f603f0521
tree4ce189d43dc4f78e36d8f667230363e9746c0cd1
parent6356f2d2fc7309c2a132fb9dd87343bcd5794efb
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>
block/blk-integrity.c
block/blk.h
block/genhd.c
include/linux/genhd.h