mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-25 11:55:37 +00:00
mm: slub: make kobj_type structure constant
Since commit ee6d3dd4ed
("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>
This commit is contained in:
parent
e9d198f2be
commit
9ebe720eb9
1 changed files with 1 additions and 1 deletions
|
@ -6059,7 +6059,7 @@ static const struct sysfs_ops slab_sysfs_ops = {
|
|||
.store = slab_attr_store,
|
||||
};
|
||||
|
||||
static struct kobj_type slab_ktype = {
|
||||
static const struct kobj_type slab_ktype = {
|
||||
.sysfs_ops = &slab_sysfs_ops,
|
||||
.release = kmem_cache_release,
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue