summaryrefslogtreecommitdiffstats
path: root/fs/ext4/xattr.c
diff options
context:
space:
mode:
authorEric Biggers <ebiggers@google.com>2017-04-29 23:47:50 -0400
committerTheodore Ts'o <tytso@mit.edu>2017-04-29 23:47:50 -0400
commitd60061867303aa2fee516e9a34efc15e78d975a9 (patch)
tree8809db4e180a92f88d9de2f0031783cdb7681fcc /fs/ext4/xattr.c
parent1bc0af600b011dbbf9bbf39664b858ea2e365729 (diff)
downloadlinux-d60061867303aa2fee516e9a34efc15e78d975a9.tar.bz2
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/xattr.c')
-rw-r--r--fs/ext4/xattr.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/ext4/xattr.c b/fs/ext4/xattr.c
index 996e7900d4c8..a9ce2cf2ae69 100644
--- a/fs/ext4/xattr.c
+++ b/fs/ext4/xattr.c
@@ -81,7 +81,7 @@ static void ext4_xattr_rehash(struct ext4_xattr_header *,
static int ext4_xattr_list(struct dentry *dentry, char *buffer,
size_t buffer_size);
-static const struct xattr_handler *ext4_xattr_handler_map[] = {
+static const struct xattr_handler * const ext4_xattr_handler_map[] = {
[EXT4_XATTR_INDEX_USER] = &ext4_xattr_user_handler,
#ifdef CONFIG_EXT4_FS_POSIX_ACL
[EXT4_XATTR_INDEX_POSIX_ACL_ACCESS] = &posix_acl_access_xattr_handler,