aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/fscrypt_notsupp.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/fscrypt_notsupp.h')
-rw-r--r--include/linux/fscrypt_notsupp.h59
1 files changed, 41 insertions, 18 deletions
diff --git a/include/linux/fscrypt_notsupp.h b/include/linux/fscrypt_notsupp.h
index 63e58808519a..44b50c04bae9 100644
--- a/include/linux/fscrypt_notsupp.h
+++ b/include/linux/fscrypt_notsupp.h
@@ -14,6 +14,16 @@
14#ifndef _LINUX_FSCRYPT_NOTSUPP_H 14#ifndef _LINUX_FSCRYPT_NOTSUPP_H
15#define _LINUX_FSCRYPT_NOTSUPP_H 15#define _LINUX_FSCRYPT_NOTSUPP_H
16 16
17static inline bool fscrypt_has_encryption_key(const struct inode *inode)
18{
19 return false;
20}
21
22static inline bool fscrypt_dummy_context_enabled(struct inode *inode)
23{
24 return false;
25}
26
17/* crypto.c */ 27/* crypto.c */
18static inline struct fscrypt_ctx *fscrypt_get_ctx(const struct inode *inode, 28static inline struct fscrypt_ctx *fscrypt_get_ctx(const struct inode *inode,
19 gfp_t gfp_flags) 29 gfp_t gfp_flags)
@@ -43,6 +53,11 @@ static inline int fscrypt_decrypt_page(const struct inode *inode,
43 return -EOPNOTSUPP; 53 return -EOPNOTSUPP;
44} 54}
45 55
56static inline struct page *fscrypt_control_page(struct page *page)
57{
58 WARN_ON_ONCE(1);
59 return ERR_PTR(-EINVAL);
60}
46 61
47static inline void fscrypt_restore_control_page(struct page *page) 62static inline void fscrypt_restore_control_page(struct page *page)
48{ 63{
@@ -90,8 +105,7 @@ static inline int fscrypt_get_encryption_info(struct inode *inode)
90 return -EOPNOTSUPP; 105 return -EOPNOTSUPP;
91} 106}
92 107
93static inline void fscrypt_put_encryption_info(struct inode *inode, 108static inline void fscrypt_put_encryption_info(struct inode *inode)
94 struct fscrypt_info *ci)
95{ 109{
96 return; 110 return;
97} 111}
@@ -116,16 +130,8 @@ static inline void fscrypt_free_filename(struct fscrypt_name *fname)
116 return; 130 return;
117} 131}
118 132
119static inline u32 fscrypt_fname_encrypted_size(const struct inode *inode,
120 u32 ilen)
121{
122 /* never happens */
123 WARN_ON(1);
124 return 0;
125}
126
127static inline int fscrypt_fname_alloc_buffer(const struct inode *inode, 133static inline int fscrypt_fname_alloc_buffer(const struct inode *inode,
128 u32 ilen, 134 u32 max_encrypted_len,
129 struct fscrypt_str *crypto_str) 135 struct fscrypt_str *crypto_str)
130{ 136{
131 return -EOPNOTSUPP; 137 return -EOPNOTSUPP;
@@ -144,13 +150,6 @@ static inline int fscrypt_fname_disk_to_usr(struct inode *inode,
144 return -EOPNOTSUPP; 150 return -EOPNOTSUPP;
145} 151}
146 152
147static inline int fscrypt_fname_usr_to_disk(struct inode *inode,
148 const struct qstr *iname,
149 struct fscrypt_str *oname)
150{
151 return -EOPNOTSUPP;
152}
153
154static inline bool fscrypt_match_name(const struct fscrypt_name *fname, 153static inline bool fscrypt_match_name(const struct fscrypt_name *fname,
155 const u8 *de_name, u32 de_name_len) 154 const u8 *de_name, u32 de_name_len)
156{ 155{
@@ -208,4 +207,28 @@ static inline int __fscrypt_prepare_lookup(struct inode *dir,
208 return -EOPNOTSUPP; 207 return -EOPNOTSUPP;
209} 208}
210 209
210static inline int __fscrypt_prepare_symlink(struct inode *dir,
211 unsigned int len,
212 unsigned int max_len,
213 struct fscrypt_str *disk_link)
214{
215 return -EOPNOTSUPP;
216}
217
218static inline int __fscrypt_encrypt_symlink(struct inode *inode,
219 const char *target,
220 unsigned int len,
221 struct fscrypt_str *disk_link)
222{
223 return -EOPNOTSUPP;
224}
225
226static inline const char *fscrypt_get_symlink(struct inode *inode,
227 const void *caddr,
228 unsigned int max_size,
229 struct delayed_call *done)
230{
231 return ERR_PTR(-EOPNOTSUPP);
232}
233
211#endif /* _LINUX_FSCRYPT_NOTSUPP_H */ 234#endif /* _LINUX_FSCRYPT_NOTSUPP_H */