]> Git Repo - linux.git/commit
orangefs: Constify struct kobj_type
authorHuang Xiaojia <[email protected]>
Mon, 26 Aug 2024 15:04:18 +0000 (23:04 +0800)
committerMike Marshall <[email protected]>
Fri, 6 Sep 2024 14:18:17 +0000 (10:18 -0400)
commit96319dacaf15f666bcba7275953d780e23fe9e75
tree9a35154698ec5b330587d98c87cee9e3e5fee429
parent5be63fc19fcaa4c236b307420483578a56986a37
orangefs: Constify struct kobj_type

'struct kobj_type' is not modified. It is only used in kobject_init()
which takes a 'const struct kobj_type *ktype' parameter.

Constifying this structure moves some data to a read-only section,
so increase over all security.

On a x86_64, compiled with defconfig:
Before:
======
   text    data     bss     dec     hex filename
   7036    2136      56    9228    240c fs/orangefs/orangefs-sysfs.o

After:
======
   text    data     bss     dec     hex filename
   7484    1880      56    9420    24cc fs/orangefs/orangefs-sysfs.o

Signed-off-by: Huang Xiaojia <[email protected]>
Signed-off-by: Mike Marshall <[email protected]>
fs/orangefs/orangefs-sysfs.c
This page took 0.054947 seconds and 4 git commands to generate.