summaryrefslogtreecommitdiffstats
path: root/fs/ext4/mballoc.c
diff options
context:
space:
mode:
authorEric Biggers2017-04-30 05:47:50 +0200
committerTheodore Ts'o2017-04-30 05:47:50 +0200
commitd60061867303aa2fee516e9a34efc15e78d975a9 (patch)
tree8809db4e180a92f88d9de2f0031783cdb7681fcc /fs/ext4/mballoc.c
parentext4: trim return value and 'dir' argument from ext4_insert_dentry() (diff)
downloadkernel-qcow2-linux-d60061867303aa2fee516e9a34efc15e78d975a9.tar.gz
kernel-qcow2-linux-d60061867303aa2fee516e9a34efc15e78d975a9.tar.xz
kernel-qcow2-linux-d60061867303aa2fee516e9a34efc15e78d975a9.zip
ext4: constify static data that is never modified
Constify static data in ext4 that is never (intentionally) modified so that it is placed in .rodata and benefits from memory protection. Signed-off-by: Eric Biggers <ebiggers@google.com> Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Diffstat (limited to 'fs/ext4/mballoc.c')
-rw-r--r--fs/ext4/mballoc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/ext4/mballoc.c b/fs/ext4/mballoc.c
index 354dc1a894c2..dbe51301c2bb 100644
--- a/fs/ext4/mballoc.c
+++ b/fs/ext4/mballoc.c
@@ -357,7 +357,7 @@ static struct kmem_cache *ext4_free_data_cachep;
#define NR_GRPINFO_CACHES 8
static struct kmem_cache *ext4_groupinfo_caches[NR_GRPINFO_CACHES];
-static const char *ext4_groupinfo_slab_names[NR_GRPINFO_CACHES] = {
+static const char * const ext4_groupinfo_slab_names[NR_GRPINFO_CACHES] = {
"ext4_groupinfo_1k", "ext4_groupinfo_2k", "ext4_groupinfo_4k",
"ext4_groupinfo_8k", "ext4_groupinfo_16k", "ext4_groupinfo_32k",
"ext4_groupinfo_64k", "ext4_groupinfo_128k"