]> www.infradead.org Git - users/jedix/linux-maple.git/commit
md-cluster: Constify struct md_cluster_operations
authorChristophe JAILLET <christophe.jaillet@wanadoo.fr>
Sun, 23 Jun 2024 20:17:54 +0000 (22:17 +0200)
committerSong Liu <song@kernel.org>
Thu, 4 Jul 2024 06:20:27 +0000 (06:20 +0000)
commit1f4a72ff00cafa74b43b0c8a37573c78f86ed1a8
treef1a729d6518ac2daaa0a2d63b72e460661eebc4f
parentae720670b9fc5ef3588efd5b95e6a0f59a36dec0
md-cluster: Constify struct md_cluster_operations

'struct md_cluster_operations' is not modified in this driver.

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

On a x86_64, with allmodconfig, as an example:
Before:
======
   text    data     bss     dec     hex filename
  51941    1442      80   53463    d0d7 drivers/md/md-cluster.o

After:
=====
   text    data     bss     dec     hex filename
  52133    1246      80   53459    d0d3 drivers/md/md-cluster.o

Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Signed-off-by: Song Liu <song@kernel.org>
Link: https://lore.kernel.org/r/3727f3ce9693cae4e62ae6778ea13971df805479.1719173852.git.christophe.jaillet@wanadoo.fr
drivers/md/md-cluster.c
drivers/md/md.c
drivers/md/md.h