Skip to content

Commit 9ebe720

Browse files
t-8chtehcaster
authored andcommitted
mm: slub: make kobj_type structure constant
Since commit ee6d3dd ("driver core: make kobj_type constant.") the driver core allows the usage of const struct kobj_type. Take advantage of this to constify the structure definition to prevent modification at runtime. Signed-off-by: Thomas Weißschuh <linux@weissschuh.net> Acked-by: Hyeonggon Yoo <42.hyeyoo@gmail.com> Signed-off-by: Vlastimil Babka <vbabka@suse.cz>
1 parent e9d198f commit 9ebe720

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

mm/slub.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6059,7 +6059,7 @@ static const struct sysfs_ops slab_sysfs_ops = {
60596059
.store = slab_attr_store,
60606060
};
60616061

6062-
static struct kobj_type slab_ktype = {
6062+
static const struct kobj_type slab_ktype = {
60636063
.sysfs_ops = &slab_sysfs_ops,
60646064
.release = kmem_cache_release,
60656065
};

0 commit comments

Comments
 (0)