]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
fscrypt: constify struct fscrypt_operations
authorEric Biggers <ebiggers@google.com>
Tue, 7 Feb 2017 20:42:10 +0000 (12:42 -0800)
committerTheodore Ts'o <tytso@mit.edu>
Wed, 8 Feb 2017 15:59:57 +0000 (10:59 -0500)
Signed-off-by: Eric Biggers <ebiggers@google.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Reviewed-by: Richard Weinberger <richard@nod.at>
fs/ext4/super.c
fs/f2fs/super.c
fs/ubifs/crypto.c
fs/ubifs/super.c
fs/ubifs/ubifs.h

index 9d15a6293124d673696b609bf368c16d737848dc..20539c2cd6d8fe4d83b87348c9eb10c5e844248c 100644 (file)
@@ -1173,7 +1173,7 @@ static unsigned ext4_max_namelen(struct inode *inode)
                EXT4_NAME_LEN;
 }
 
-static struct fscrypt_operations ext4_cryptops = {
+static const struct fscrypt_operations ext4_cryptops = {
        .key_prefix             = "ext4:",
        .get_context            = ext4_get_context,
        .prepare_context        = ext4_prepare_context,
@@ -1184,7 +1184,7 @@ static struct fscrypt_operations ext4_cryptops = {
        .max_namelen            = ext4_max_namelen,
 };
 #else
-static struct fscrypt_operations ext4_cryptops = {
+static const struct fscrypt_operations ext4_cryptops = {
        .is_encrypted           = ext4_encrypted_inode,
 };
 #endif
index 739192d95e71eb1b6b59083459203427c25bedfa..24f40197eb00f8c8c3892db86e3d9e631064cc55 100644 (file)
@@ -1170,7 +1170,7 @@ static unsigned f2fs_max_namelen(struct inode *inode)
                        inode->i_sb->s_blocksize : F2FS_NAME_LEN;
 }
 
-static struct fscrypt_operations f2fs_cryptops = {
+static const struct fscrypt_operations f2fs_cryptops = {
        .key_prefix     = "f2fs:",
        .get_context    = f2fs_get_context,
        .set_context    = f2fs_set_context,
@@ -1179,7 +1179,7 @@ static struct fscrypt_operations f2fs_cryptops = {
        .max_namelen    = f2fs_max_namelen,
 };
 #else
-static struct fscrypt_operations f2fs_cryptops = {
+static const struct fscrypt_operations f2fs_cryptops = {
        .is_encrypted   = f2fs_encrypted_inode,
 };
 #endif
index 6335abcf98df2574a10265f01f3a06dadd9e255d..382ed428cfd2167cc8c57c934e06ab29a92ceb6c 100644 (file)
@@ -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,
index e08aa04fc8351ca03db6479f94a33c0fe1ff845b..b73811bd7676d6221243f21d52b06d9efed7cf4a 100644 (file)
@@ -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
index d9df379bacc629c07213f85408dcfa22a662c7ed..f0c86f076535a6ab7a8a791ea7be231be3fe44b9 100644 (file)
@@ -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)
 {