summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEric Biggers <ebiggers@google.com>2017-02-07 15:42:10 -0500
committerTheodore Ts'o <tytso@mit.edu>2017-02-08 10:59:57 -0500
commit6f69f0ed6136c302976f8e8f859b73d47f0c0c5c (patch)
treea0d3d6f76953010e4952b09779a6d3fab13ea205
parentb14c8e6afd873cae97060272efaac376efec77a4 (diff)
fscrypt: constify struct fscrypt_operations
Signed-off-by: Eric Biggers <ebiggers@google.com> Signed-off-by: Theodore Ts'o <tytso@mit.edu> Reviewed-by: Richard Weinberger <richard@nod.at>
-rw-r--r--fs/ext4/super.c4
-rw-r--r--fs/f2fs/super.c4
-rw-r--r--fs/ubifs/crypto.c2
-rw-r--r--fs/ubifs/super.c2
-rw-r--r--fs/ubifs/ubifs.h2
5 files changed, 7 insertions, 7 deletions
diff --git a/fs/ext4/super.c b/fs/ext4/super.c
index 9d15a6293124..20539c2cd6d8 100644
--- a/fs/ext4/super.c
+++ b/fs/ext4/super.c
@@ -1173,7 +1173,7 @@ static unsigned ext4_max_namelen(struct inode *inode)
1173 EXT4_NAME_LEN; 1173 EXT4_NAME_LEN;
1174} 1174}
1175 1175
1176static struct fscrypt_operations ext4_cryptops = { 1176static const struct fscrypt_operations ext4_cryptops = {
1177 .key_prefix = "ext4:", 1177 .key_prefix = "ext4:",
1178 .get_context = ext4_get_context, 1178 .get_context = ext4_get_context,
1179 .prepare_context = ext4_prepare_context, 1179 .prepare_context = ext4_prepare_context,
@@ -1184,7 +1184,7 @@ static struct fscrypt_operations ext4_cryptops = {
1184 .max_namelen = ext4_max_namelen, 1184 .max_namelen = ext4_max_namelen,
1185}; 1185};
1186#else 1186#else
1187static struct fscrypt_operations ext4_cryptops = { 1187static const struct fscrypt_operations ext4_cryptops = {
1188 .is_encrypted = ext4_encrypted_inode, 1188 .is_encrypted = ext4_encrypted_inode,
1189}; 1189};
1190#endif 1190#endif
diff --git a/fs/f2fs/super.c b/fs/f2fs/super.c
index 739192d95e71..24f40197eb00 100644
--- a/fs/f2fs/super.c
+++ b/fs/f2fs/super.c
@@ -1170,7 +1170,7 @@ static unsigned f2fs_max_namelen(struct inode *inode)
1170 inode->i_sb->s_blocksize : F2FS_NAME_LEN; 1170 inode->i_sb->s_blocksize : F2FS_NAME_LEN;
1171} 1171}
1172 1172
1173static struct fscrypt_operations f2fs_cryptops = { 1173static const struct fscrypt_operations f2fs_cryptops = {
1174 .key_prefix = "f2fs:", 1174 .key_prefix = "f2fs:",
1175 .get_context = f2fs_get_context, 1175 .get_context = f2fs_get_context,
1176 .set_context = f2fs_set_context, 1176 .set_context = f2fs_set_context,
@@ -1179,7 +1179,7 @@ static struct fscrypt_operations f2fs_cryptops = {
1179 .max_namelen = f2fs_max_namelen, 1179 .max_namelen = f2fs_max_namelen,
1180}; 1180};
1181#else 1181#else
1182static struct fscrypt_operations f2fs_cryptops = { 1182static const struct fscrypt_operations f2fs_cryptops = {
1183 .is_encrypted = f2fs_encrypted_inode, 1183 .is_encrypted = f2fs_encrypted_inode,
1184}; 1184};
1185#endif 1185#endif
diff --git a/fs/ubifs/crypto.c b/fs/ubifs/crypto.c
index 6335abcf98df..382ed428cfd2 100644
--- a/fs/ubifs/crypto.c
+++ b/fs/ubifs/crypto.c
@@ -77,7 +77,7 @@ int ubifs_decrypt(const struct inode *inode, struct ubifs_data_node *dn,
77 return 0; 77 return 0;
78} 78}
79 79
80struct fscrypt_operations ubifs_crypt_operations = { 80const struct fscrypt_operations ubifs_crypt_operations = {
81 .flags = FS_CFLG_OWN_PAGES, 81 .flags = FS_CFLG_OWN_PAGES,
82 .key_prefix = "ubifs:", 82 .key_prefix = "ubifs:",
83 .get_context = ubifs_crypt_get_context, 83 .get_context = ubifs_crypt_get_context,
diff --git a/fs/ubifs/super.c b/fs/ubifs/super.c
index e08aa04fc835..b73811bd7676 100644
--- a/fs/ubifs/super.c
+++ b/fs/ubifs/super.c
@@ -2000,7 +2000,7 @@ static struct ubifs_info *alloc_ubifs_info(struct ubi_volume_desc *ubi)
2000} 2000}
2001 2001
2002#ifndef CONFIG_UBIFS_FS_ENCRYPTION 2002#ifndef CONFIG_UBIFS_FS_ENCRYPTION
2003struct fscrypt_operations ubifs_crypt_operations = { 2003const struct fscrypt_operations ubifs_crypt_operations = {
2004 .is_encrypted = __ubifs_crypt_is_encrypted, 2004 .is_encrypted = __ubifs_crypt_is_encrypted,
2005}; 2005};
2006#endif 2006#endif
diff --git a/fs/ubifs/ubifs.h b/fs/ubifs/ubifs.h
index d9df379bacc6..f0c86f076535 100644
--- a/fs/ubifs/ubifs.h
+++ b/fs/ubifs/ubifs.h
@@ -1824,7 +1824,7 @@ int ubifs_decrypt(const struct inode *inode, struct ubifs_data_node *dn,
1824 unsigned int *out_len, int block); 1824 unsigned int *out_len, int block);
1825#endif 1825#endif
1826 1826
1827extern struct fscrypt_operations ubifs_crypt_operations; 1827extern const struct fscrypt_operations ubifs_crypt_operations;
1828 1828
1829static inline bool __ubifs_crypt_is_encrypted(struct inode *inode) 1829static inline bool __ubifs_crypt_is_encrypted(struct inode *inode)
1830{ 1830{