summaryrefslogtreecommitdiff
path: root/fs/ext4/super.c
diff options
context:
space:
mode:
authorEric Biggers <ebiggers@google.com>2017-04-30 06:47:50 +0300
committerTheodore Ts'o <tytso@mit.edu>2017-04-30 06:47:50 +0300
commitd60061867303aa2fee516e9a34efc15e78d975a9 (patch)
tree8809db4e180a92f88d9de2f0031783cdb7681fcc /fs/ext4/super.c
parent1bc0af600b011dbbf9bbf39664b858ea2e365729 (diff)
downloadlinux-d60061867303aa2fee516e9a34efc15e78d975a9.tar.xz
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/super.c')
-rw-r--r--fs/ext4/super.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/fs/ext4/super.c b/fs/ext4/super.c
index a9448db1cf7e..7b82487401d2 100644
--- a/fs/ext4/super.c
+++ b/fs/ext4/super.c
@@ -1208,7 +1208,7 @@ static const struct fscrypt_operations ext4_cryptops = {
#endif
#ifdef CONFIG_QUOTA
-static char *quotatypes[] = INITQFNAMES;
+static const char * const quotatypes[] = INITQFNAMES;
#define QTYPE2NAME(t) (quotatypes[t])
static int ext4_write_dquot(struct dquot *dquot);
@@ -1422,7 +1422,8 @@ static ext4_fsblk_t get_sb_block(void **data)
}
#define DEFAULT_JOURNAL_IOPRIO (IOPRIO_PRIO_VALUE(IOPRIO_CLASS_BE, 3))
-static char deprecated_msg[] = "Mount option \"%s\" will be removed by %s\n"
+static const char deprecated_msg[] =
+ "Mount option \"%s\" will be removed by %s\n"
"Contact linux-ext4@vger.kernel.org if you think we should keep it.\n";
#ifdef CONFIG_QUOTA