From 6f69f0ed6136c302976f8e8f859b73d47f0c0c5c Mon Sep 17 00:00:00 2001 From: Eric Biggers Date: Tue, 7 Feb 2017 12:42:10 -0800 Subject: fscrypt: constify struct fscrypt_operations Signed-off-by: Eric Biggers Signed-off-by: Theodore Ts'o Reviewed-by: Richard Weinberger --- fs/ubifs/crypto.c | 2 +- fs/ubifs/super.c | 2 +- fs/ubifs/ubifs.h | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) (limited to 'fs/ubifs') diff --git a/fs/ubifs/crypto.c b/fs/ubifs/crypto.c index 6335abc..382ed42 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, return 0; } -struct fscrypt_operations ubifs_crypt_operations = { +const struct fscrypt_operations ubifs_crypt_operations = { .flags = FS_CFLG_OWN_PAGES, .key_prefix = "ubifs:", .get_context = ubifs_crypt_get_context, diff --git a/fs/ubifs/super.c b/fs/ubifs/super.c index e08aa04..b73811b 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) } #ifndef CONFIG_UBIFS_FS_ENCRYPTION -struct fscrypt_operations ubifs_crypt_operations = { +const struct fscrypt_operations ubifs_crypt_operations = { .is_encrypted = __ubifs_crypt_is_encrypted, }; #endif diff --git a/fs/ubifs/ubifs.h b/fs/ubifs/ubifs.h index d9df379..f0c86f0 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, unsigned int *out_len, int block); #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) { -- cgit v1.1