summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEric Biggers <ebiggers@google.com>2017-10-09 15:15:37 -0400
committerTheodore Ts'o <tytso@mit.edu>2017-10-18 19:52:37 -0400
commitf7293e48bb1d0c482cd706deb1256a6be718f4f5 (patch)
tree133fe0355f6adb4eed0c7108c060889470185b8d
parente0428a266d5a29a3c2eec287fcd49be9e8e2468e (diff)
fscrypt: remove ->is_encrypted()
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>
-rw-r--r--fs/ext4/super.c2
-rw-r--r--fs/f2fs/super.c2
-rw-r--r--fs/ubifs/crypto.c1
-rw-r--r--fs/ubifs/super.c1
-rw-r--r--fs/ubifs/ubifs.h9
-rw-r--r--include/linux/fscrypt.h1
6 files changed, 2 insertions, 14 deletions
diff --git a/fs/ext4/super.c b/fs/ext4/super.c
index dcfb19539871..bc63cdf194e3 100644
--- a/fs/ext4/super.c
+++ b/fs/ext4/super.c
@@ -1241,13 +1241,11 @@ static const struct fscrypt_operations ext4_cryptops = {
1241 .get_context = ext4_get_context, 1241 .get_context = ext4_get_context,
1242 .set_context = ext4_set_context, 1242 .set_context = ext4_set_context,
1243 .dummy_context = ext4_dummy_context, 1243 .dummy_context = ext4_dummy_context,
1244 .is_encrypted = ext4_encrypted_inode,
1245 .empty_dir = ext4_empty_dir, 1244 .empty_dir = ext4_empty_dir,
1246 .max_namelen = ext4_max_namelen, 1245 .max_namelen = ext4_max_namelen,
1247}; 1246};
1248#else 1247#else
1249static const struct fscrypt_operations ext4_cryptops = { 1248static const struct fscrypt_operations ext4_cryptops = {
1250 .is_encrypted = ext4_encrypted_inode,
1251}; 1249};
1252#endif 1250#endif
1253 1251
diff --git a/fs/f2fs/super.c b/fs/f2fs/super.c
index 89f61eb3d167..1cb41f711ab8 100644
--- a/fs/f2fs/super.c
+++ b/fs/f2fs/super.c
@@ -1594,13 +1594,11 @@ static const struct fscrypt_operations f2fs_cryptops = {
1594 .key_prefix = "f2fs:", 1594 .key_prefix = "f2fs:",
1595 .get_context = f2fs_get_context, 1595 .get_context = f2fs_get_context,
1596 .set_context = f2fs_set_context, 1596 .set_context = f2fs_set_context,
1597 .is_encrypted = f2fs_encrypted_inode,
1598 .empty_dir = f2fs_empty_dir, 1597 .empty_dir = f2fs_empty_dir,
1599 .max_namelen = f2fs_max_namelen, 1598 .max_namelen = f2fs_max_namelen,
1600}; 1599};
1601#else 1600#else
1602static const struct fscrypt_operations f2fs_cryptops = { 1601static const struct fscrypt_operations f2fs_cryptops = {
1603 .is_encrypted = f2fs_encrypted_inode,
1604}; 1602};
1605#endif 1603#endif
1606 1604
diff --git a/fs/ubifs/crypto.c b/fs/ubifs/crypto.c
index 114ba455bac3..8880fa7733d8 100644
--- a/fs/ubifs/crypto.c
+++ b/fs/ubifs/crypto.c
@@ -87,7 +87,6 @@ const struct fscrypt_operations ubifs_crypt_operations = {
87 .key_prefix = "ubifs:", 87 .key_prefix = "ubifs:",
88 .get_context = ubifs_crypt_get_context, 88 .get_context = ubifs_crypt_get_context,
89 .set_context = ubifs_crypt_set_context, 89 .set_context = ubifs_crypt_set_context,
90 .is_encrypted = __ubifs_crypt_is_encrypted,
91 .empty_dir = ubifs_crypt_empty_dir, 90 .empty_dir = ubifs_crypt_empty_dir,
92 .max_namelen = ubifs_crypt_max_namelen, 91 .max_namelen = ubifs_crypt_max_namelen,
93}; 92};
diff --git a/fs/ubifs/super.c b/fs/ubifs/super.c
index 5496b17b959c..adaca6088836 100644
--- a/fs/ubifs/super.c
+++ b/fs/ubifs/super.c
@@ -2009,7 +2009,6 @@ static struct ubifs_info *alloc_ubifs_info(struct ubi_volume_desc *ubi)
2009 2009
2010#ifndef CONFIG_UBIFS_FS_ENCRYPTION 2010#ifndef CONFIG_UBIFS_FS_ENCRYPTION
2011const struct fscrypt_operations ubifs_crypt_operations = { 2011const struct fscrypt_operations ubifs_crypt_operations = {
2012 .is_encrypted = __ubifs_crypt_is_encrypted,
2013}; 2012};
2014#endif 2013#endif
2015 2014
diff --git a/fs/ubifs/ubifs.h b/fs/ubifs/ubifs.h
index 6a346d4af98f..63c7468147eb 100644
--- a/fs/ubifs/ubifs.h
+++ b/fs/ubifs/ubifs.h
@@ -1834,18 +1834,13 @@ int ubifs_decrypt(const struct inode *inode, struct ubifs_data_node *dn,
1834 1834
1835extern const struct fscrypt_operations ubifs_crypt_operations; 1835extern const struct fscrypt_operations ubifs_crypt_operations;
1836 1836
1837static inline bool __ubifs_crypt_is_encrypted(struct inode *inode) 1837static inline bool ubifs_crypt_is_encrypted(const struct inode *inode)
1838{ 1838{
1839 struct ubifs_inode *ui = ubifs_inode(inode); 1839 const struct ubifs_inode *ui = ubifs_inode(inode);
1840 1840
1841 return ui->flags & UBIFS_CRYPT_FL; 1841 return ui->flags & UBIFS_CRYPT_FL;
1842} 1842}
1843 1843
1844static inline bool ubifs_crypt_is_encrypted(const struct inode *inode)
1845{
1846 return __ubifs_crypt_is_encrypted((struct inode *)inode);
1847}
1848
1849/* Normal UBIFS messages */ 1844/* Normal UBIFS messages */
1850__printf(2, 3) 1845__printf(2, 3)
1851void ubifs_msg(const struct ubifs_info *c, const char *fmt, ...); 1846void ubifs_msg(const struct ubifs_info *c, const char *fmt, ...);
diff --git a/include/linux/fscrypt.h b/include/linux/fscrypt.h
index bfc962e62078..d58e6a90cfe4 100644
--- a/include/linux/fscrypt.h
+++ b/include/linux/fscrypt.h
@@ -81,7 +81,6 @@ struct fscrypt_operations {
81 int (*get_context)(struct inode *, void *, size_t); 81 int (*get_context)(struct inode *, void *, size_t);
82 int (*set_context)(struct inode *, const void *, size_t, void *); 82 int (*set_context)(struct inode *, const void *, size_t, void *);
83 bool (*dummy_context)(struct inode *); 83 bool (*dummy_context)(struct inode *);
84 bool (*is_encrypted)(struct inode *);
85 bool (*empty_dir)(struct inode *); 84 bool (*empty_dir)(struct inode *);
86 unsigned (*max_namelen)(struct inode *); 85 unsigned (*max_namelen)(struct inode *);
87}; 86};