]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
ocfs2: constify struct configfs_item_operations and configfs_group_operations
authorChristophe JAILLET <christophe.jaillet@wanadoo.fr>
Sun, 14 Dec 2025 10:41:35 +0000 (11:41 +0100)
committerAndrew Morton <akpm@linux-foundation.org>
Wed, 21 Jan 2026 03:44:16 +0000 (19:44 -0800)
commit9677a51abd860aa75bd4fe28176672744bf5180e
tree8f875cc995d60cae98de49c538529efe2e556880
parentfd4d53bde9128bc85d85cc3427bd592e4c3293e4
ocfs2: constify struct configfs_item_operations and configfs_group_operations

'struct configfs_item_operations' and 'configfs_group_operations' are not
modified in this driver.

Constifying these structures moves some data to a read-only section, so
increases overall security, especially when the structure holds some
function pointers.

On a x86_64, with allmodconfig, as an example:
Before:
======
   text    data     bss     dec     hex filename
  74011   19312    5280   98603   1812b fs/ocfs2/cluster/heartbeat.o

After:
=====
   text    data     bss     dec     hex filename
  74171   19152    5280   98603   1812b fs/ocfs2/cluster/heartbeat.o

Link: https://lkml.kernel.org/r/7c7c00ba328e5e514d8debee698154039e9640dd.1765708880.git.christophe.jaillet@wanadoo.fr
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Acked-by: Joseph Qi <joseph.qi@linux.alibaba.com>
Cc: Mark Fasheh <mark@fasheh.com>
Cc: Joel Becker <jlbec@evilplan.org>
Cc: Junxiao Bi <junxiao.bi@oracle.com>
Cc: Changwei Ge <gechangwei@live.cn>
Cc: Jun Piao <piaojun@huawei.com>
Cc: Heming Zhao <heming.zhao@suse.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
fs/ocfs2/cluster/heartbeat.c
fs/ocfs2/cluster/nodemanager.c