Commit 6f69f0ed authored by Eric Biggers's avatar Eric Biggers Committed by Theodore Ts'o

fscrypt: constify struct fscrypt_operations

Signed-off-by: default avatarEric Biggers <ebiggers@google.com>
Signed-off-by: default avatarTheodore Ts'o <tytso@mit.edu>
Reviewed-by: default avatarRichard Weinberger <richard@nod.at>
parent b14c8e6a
...@@ -1173,7 +1173,7 @@ static unsigned ext4_max_namelen(struct inode *inode) ...@@ -1173,7 +1173,7 @@ static unsigned ext4_max_namelen(struct inode *inode)
EXT4_NAME_LEN; EXT4_NAME_LEN;
} }
static struct fscrypt_operations ext4_cryptops = { static const struct fscrypt_operations ext4_cryptops = {
.key_prefix = "ext4:", .key_prefix = "ext4:",
.get_context = ext4_get_context, .get_context = ext4_get_context,
.prepare_context = ext4_prepare_context, .prepare_context = ext4_prepare_context,
...@@ -1184,7 +1184,7 @@ static struct fscrypt_operations ext4_cryptops = { ...@@ -1184,7 +1184,7 @@ static struct fscrypt_operations ext4_cryptops = {
.max_namelen = ext4_max_namelen, .max_namelen = ext4_max_namelen,
}; };
#else #else
static struct fscrypt_operations ext4_cryptops = { static const struct fscrypt_operations ext4_cryptops = {
.is_encrypted = ext4_encrypted_inode, .is_encrypted = ext4_encrypted_inode,
}; };
#endif #endif
......
...@@ -1170,7 +1170,7 @@ static unsigned f2fs_max_namelen(struct inode *inode) ...@@ -1170,7 +1170,7 @@ static unsigned f2fs_max_namelen(struct inode *inode)
inode->i_sb->s_blocksize : F2FS_NAME_LEN; inode->i_sb->s_blocksize : F2FS_NAME_LEN;
} }
static struct fscrypt_operations f2fs_cryptops = { static const struct fscrypt_operations f2fs_cryptops = {
.key_prefix = "f2fs:", .key_prefix = "f2fs:",
.get_context = f2fs_get_context, .get_context = f2fs_get_context,
.set_context = f2fs_set_context, .set_context = f2fs_set_context,
...@@ -1179,7 +1179,7 @@ static struct fscrypt_operations f2fs_cryptops = { ...@@ -1179,7 +1179,7 @@ static struct fscrypt_operations f2fs_cryptops = {
.max_namelen = f2fs_max_namelen, .max_namelen = f2fs_max_namelen,
}; };
#else #else
static struct fscrypt_operations f2fs_cryptops = { static const struct fscrypt_operations f2fs_cryptops = {
.is_encrypted = f2fs_encrypted_inode, .is_encrypted = f2fs_encrypted_inode,
}; };
#endif #endif
......
...@@ -77,7 +77,7 @@ int ubifs_decrypt(const struct inode *inode, struct ubifs_data_node *dn, ...@@ -77,7 +77,7 @@ int ubifs_decrypt(const struct inode *inode, struct ubifs_data_node *dn,
return 0; return 0;
} }
struct fscrypt_operations ubifs_crypt_operations = { const struct fscrypt_operations ubifs_crypt_operations = {
.flags = FS_CFLG_OWN_PAGES, .flags = FS_CFLG_OWN_PAGES,
.key_prefix = "ubifs:", .key_prefix = "ubifs:",
.get_context = ubifs_crypt_get_context, .get_context = ubifs_crypt_get_context,
......
...@@ -2000,7 +2000,7 @@ static struct ubifs_info *alloc_ubifs_info(struct ubi_volume_desc *ubi) ...@@ -2000,7 +2000,7 @@ static struct ubifs_info *alloc_ubifs_info(struct ubi_volume_desc *ubi)
} }
#ifndef CONFIG_UBIFS_FS_ENCRYPTION #ifndef CONFIG_UBIFS_FS_ENCRYPTION
struct fscrypt_operations ubifs_crypt_operations = { const struct fscrypt_operations ubifs_crypt_operations = {
.is_encrypted = __ubifs_crypt_is_encrypted, .is_encrypted = __ubifs_crypt_is_encrypted,
}; };
#endif #endif
......
...@@ -1824,7 +1824,7 @@ int ubifs_decrypt(const struct inode *inode, struct ubifs_data_node *dn, ...@@ -1824,7 +1824,7 @@ int ubifs_decrypt(const struct inode *inode, struct ubifs_data_node *dn,
unsigned int *out_len, int block); unsigned int *out_len, int block);
#endif #endif
extern struct fscrypt_operations ubifs_crypt_operations; extern const struct fscrypt_operations ubifs_crypt_operations;
static inline bool __ubifs_crypt_is_encrypted(struct inode *inode) static inline bool __ubifs_crypt_is_encrypted(struct inode *inode)
{ {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment