summaryrefslogtreecommitdiff
path: root/mm/slub.c
diff options
context:
space:
mode:
authorThomas Weißschuh <linux@weissschuh.net>2023-02-21 02:25:28 +0300
committerVlastimil Babka <vbabka@suse.cz>2023-03-13 19:21:13 +0300
commit9ebe720eb93c5aa45e8523dae397d87628dc43e1 (patch)
treeca93a8f43c6e87a8c52d048c937c76523eb53a9c /mm/slub.c
parente9d198f2be851f8c977b9ac47748edc4f9d0f26e (diff)
downloadlinux-9ebe720eb93c5aa45e8523dae397d87628dc43e1.tar.xz
mm: slub: make kobj_type structure constant
Since commit ee6d3dd4ed48 ("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>
Diffstat (limited to 'mm/slub.c')
-rw-r--r--mm/slub.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/mm/slub.c b/mm/slub.c
index 39327e98fce3..28ca576d988d 100644
--- a/mm/slub.c
+++ b/mm/slub.c
@@ -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,
};