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>
This commit is contained in:

committed by
Theodore Ts'o

parent
1bc0af600b
commit
d600618673
@@ -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
|
||||
|
Reference in New Issue
Block a user