diff options
author | Eric Biggers <ebiggers@google.com> | 2017-02-07 15:42:10 -0500 |
---|---|---|
committer | Theodore Ts'o <tytso@mit.edu> | 2017-02-08 10:59:57 -0500 |
commit | 6f69f0ed6136c302976f8e8f859b73d47f0c0c5c (patch) | |
tree | a0d3d6f76953010e4952b09779a6d3fab13ea205 | |
parent | b14c8e6afd873cae97060272efaac376efec77a4 (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.c | 4 | ||||
-rw-r--r-- | fs/f2fs/super.c | 4 | ||||
-rw-r--r-- | fs/ubifs/crypto.c | 2 | ||||
-rw-r--r-- | fs/ubifs/super.c | 2 | ||||
-rw-r--r-- | fs/ubifs/ubifs.h | 2 |
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 | ||
1176 | static struct fscrypt_operations ext4_cryptops = { | 1176 | static 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 |
1187 | static struct fscrypt_operations ext4_cryptops = { | 1187 | static 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 | ||
1173 | static struct fscrypt_operations f2fs_cryptops = { | 1173 | static 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 |
1182 | static struct fscrypt_operations f2fs_cryptops = { | 1182 | static 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 | ||
80 | struct fscrypt_operations ubifs_crypt_operations = { | 80 | const 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 |
2003 | struct fscrypt_operations ubifs_crypt_operations = { | 2003 | const 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 | ||
1827 | extern struct fscrypt_operations ubifs_crypt_operations; | 1827 | extern const struct fscrypt_operations ubifs_crypt_operations; |
1828 | 1828 | ||
1829 | static inline bool __ubifs_crypt_is_encrypted(struct inode *inode) | 1829 | static inline bool __ubifs_crypt_is_encrypted(struct inode *inode) |
1830 | { | 1830 | { |