]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
fscrypt: remove ->is_encrypted()
authorEric Biggers <ebiggers@google.com>
Mon, 9 Oct 2017 19:15:37 +0000 (12:15 -0700)
committerTheodore Ts'o <tytso@mit.edu>
Wed, 18 Oct 2017 23:52:37 +0000 (19:52 -0400)
Now that all callers of fscrypt_operations.is_encrypted() have been
switched to IS_ENCRYPTED(), remove ->is_encrypted().

Reviewed-by: Chao Yu <yuchao0@huawei.com>
Acked-by: Dave Chinner <dchinner@redhat.com>
Signed-off-by: Eric Biggers <ebiggers@google.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
fs/ext4/super.c
fs/f2fs/super.c
fs/ubifs/crypto.c
fs/ubifs/super.c
fs/ubifs/ubifs.h
include/linux/fscrypt.h

index dcfb195398717668c77160244a447e14cb817096..bc63cdf194e39c58ae1222edbc12dc879040cfe1 100644 (file)
@@ -1241,13 +1241,11 @@ static const struct fscrypt_operations ext4_cryptops = {
        .get_context            = ext4_get_context,
        .set_context            = ext4_set_context,
        .dummy_context          = ext4_dummy_context,
-       .is_encrypted           = ext4_encrypted_inode,
        .empty_dir              = ext4_empty_dir,
        .max_namelen            = ext4_max_namelen,
 };
 #else
 static const struct fscrypt_operations ext4_cryptops = {
-       .is_encrypted           = ext4_encrypted_inode,
 };
 #endif
 
index 89f61eb3d1671c3c5686a002adca8c0c427abd1c..1cb41f711ab8f1cdcc4b061b8425a8d4d1629ab7 100644 (file)
@@ -1594,13 +1594,11 @@ static const struct fscrypt_operations f2fs_cryptops = {
        .key_prefix     = "f2fs:",
        .get_context    = f2fs_get_context,
        .set_context    = f2fs_set_context,
-       .is_encrypted   = f2fs_encrypted_inode,
        .empty_dir      = f2fs_empty_dir,
        .max_namelen    = f2fs_max_namelen,
 };
 #else
 static const struct fscrypt_operations f2fs_cryptops = {
-       .is_encrypted   = f2fs_encrypted_inode,
 };
 #endif
 
index 114ba455bac3d0ee11208c5af44749d5df3864f2..8880fa7733d868ae8e45831f60685cf2de089546 100644 (file)
@@ -87,7 +87,6 @@ const struct fscrypt_operations ubifs_crypt_operations = {
        .key_prefix             = "ubifs:",
        .get_context            = ubifs_crypt_get_context,
        .set_context            = ubifs_crypt_set_context,
-       .is_encrypted           = __ubifs_crypt_is_encrypted,
        .empty_dir              = ubifs_crypt_empty_dir,
        .max_namelen            = ubifs_crypt_max_namelen,
 };
index 5496b17b959c702408c933c3a98c460042e00543..adaca60888360634fe2de7261a32cc927f851079 100644 (file)
@@ -2009,7 +2009,6 @@ static struct ubifs_info *alloc_ubifs_info(struct ubi_volume_desc *ubi)
 
 #ifndef CONFIG_UBIFS_FS_ENCRYPTION
 const struct fscrypt_operations ubifs_crypt_operations = {
-       .is_encrypted           = __ubifs_crypt_is_encrypted,
 };
 #endif
 
index 6a346d4af98fa32c96621ca4e859d1de81aa6915..63c7468147eb9b573db8270f55e8840febe99ffc 100644 (file)
@@ -1834,18 +1834,13 @@ int ubifs_decrypt(const struct inode *inode, struct ubifs_data_node *dn,
 
 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(const struct inode *inode)
 {
-       struct ubifs_inode *ui = ubifs_inode(inode);
+       const struct ubifs_inode *ui = ubifs_inode(inode);
 
        return ui->flags & UBIFS_CRYPT_FL;
 }
 
-static inline bool ubifs_crypt_is_encrypted(const struct inode *inode)
-{
-       return __ubifs_crypt_is_encrypted((struct inode *)inode);
-}
-
 /* Normal UBIFS messages */
 __printf(2, 3)
 void ubifs_msg(const struct ubifs_info *c, const char *fmt, ...);
index bfc962e62078c1d3ab700af8e5ee44b6d62309f5..d58e6a90cfe4e67d474b889f7c00203577ba4e0f 100644 (file)
@@ -81,7 +81,6 @@ struct fscrypt_operations {
        int (*get_context)(struct inode *, void *, size_t);
        int (*set_context)(struct inode *, const void *, size_t, void *);
        bool (*dummy_context)(struct inode *);
-       bool (*is_encrypted)(struct inode *);
        bool (*empty_dir)(struct inode *);
        unsigned (*max_namelen)(struct inode *);
 };