@@ -56,10 +56,11 @@ struct fscrypt_name {
56
56
struct fscrypt_operations {
57
57
unsigned int flags ;
58
58
const char * key_prefix ;
59
- int (* get_context )(struct inode * , void * , size_t );
60
- int (* set_context )(struct inode * , const void * , size_t , void * );
61
- bool (* dummy_context )(struct inode * );
62
- bool (* empty_dir )(struct inode * );
59
+ int (* get_context )(struct inode * inode , void * ctx , size_t len );
60
+ int (* set_context )(struct inode * inode , const void * ctx , size_t len ,
61
+ void * fs_data );
62
+ bool (* dummy_context )(struct inode * inode );
63
+ bool (* empty_dir )(struct inode * inode );
63
64
unsigned int max_namelen ;
64
65
bool (* has_stable_inodes )(struct super_block * sb );
65
66
void (* get_ino_and_lblk_bits )(struct super_block * sb ,
@@ -137,13 +138,15 @@ static inline struct page *fscrypt_pagecache_page(struct page *bounce_page)
137
138
extern void fscrypt_free_bounce_page (struct page * bounce_page );
138
139
139
140
/* policy.c */
140
- extern int fscrypt_ioctl_set_policy (struct file * , const void __user * );
141
- extern int fscrypt_ioctl_get_policy (struct file * , void __user * );
142
- extern int fscrypt_ioctl_get_policy_ex (struct file * , void __user * );
141
+ extern int fscrypt_ioctl_set_policy (struct file * filp , const void __user * arg );
142
+ extern int fscrypt_ioctl_get_policy (struct file * filp , void __user * arg );
143
+ extern int fscrypt_ioctl_get_policy_ex (struct file * filp , void __user * arg );
143
144
extern int fscrypt_ioctl_get_nonce (struct file * filp , void __user * arg );
144
- extern int fscrypt_has_permitted_context (struct inode * , struct inode * );
145
- extern int fscrypt_inherit_context (struct inode * , struct inode * ,
146
- void * , bool );
145
+ extern int fscrypt_has_permitted_context (struct inode * parent ,
146
+ struct inode * child );
147
+ extern int fscrypt_inherit_context (struct inode * parent , struct inode * child ,
148
+ void * fs_data , bool preload );
149
+
147
150
/* keyring.c */
148
151
extern void fscrypt_sb_free (struct super_block * sb );
149
152
extern int fscrypt_ioctl_add_key (struct file * filp , void __user * arg );
@@ -153,23 +156,24 @@ extern int fscrypt_ioctl_remove_key_all_users(struct file *filp,
153
156
extern int fscrypt_ioctl_get_key_status (struct file * filp , void __user * arg );
154
157
155
158
/* keysetup.c */
156
- extern int fscrypt_get_encryption_info (struct inode * );
157
- extern void fscrypt_put_encryption_info (struct inode * );
158
- extern void fscrypt_free_inode (struct inode * );
159
+ extern int fscrypt_get_encryption_info (struct inode * inode );
160
+ extern void fscrypt_put_encryption_info (struct inode * inode );
161
+ extern void fscrypt_free_inode (struct inode * inode );
159
162
extern int fscrypt_drop_inode (struct inode * inode );
160
163
161
164
/* fname.c */
162
- extern int fscrypt_setup_filename (struct inode * , const struct qstr * ,
163
- int lookup , struct fscrypt_name * );
165
+ extern int fscrypt_setup_filename (struct inode * inode , const struct qstr * iname ,
166
+ int lookup , struct fscrypt_name * fname );
164
167
165
168
static inline void fscrypt_free_filename (struct fscrypt_name * fname )
166
169
{
167
170
kfree (fname -> crypto_buf .name );
168
171
}
169
172
170
- extern int fscrypt_fname_alloc_buffer (const struct inode * , u32 ,
171
- struct fscrypt_str * );
172
- extern void fscrypt_fname_free_buffer (struct fscrypt_str * );
173
+ extern int fscrypt_fname_alloc_buffer (const struct inode * inode ,
174
+ u32 max_encrypted_len ,
175
+ struct fscrypt_str * crypto_str );
176
+ extern void fscrypt_fname_free_buffer (struct fscrypt_str * crypto_str );
173
177
extern int fscrypt_fname_disk_to_usr (const struct inode * inode ,
174
178
u32 hash , u32 minor_hash ,
175
179
const struct fscrypt_str * iname ,
@@ -180,9 +184,9 @@ extern u64 fscrypt_fname_siphash(const struct inode *dir,
180
184
const struct qstr * name );
181
185
182
186
/* bio.c */
183
- extern void fscrypt_decrypt_bio (struct bio * );
184
- extern int fscrypt_zeroout_range (const struct inode * , pgoff_t , sector_t ,
185
- unsigned int );
187
+ extern void fscrypt_decrypt_bio (struct bio * bio );
188
+ extern int fscrypt_zeroout_range (const struct inode * inode , pgoff_t lblk ,
189
+ sector_t pblk , unsigned int len );
186
190
187
191
/* hooks.c */
188
192
extern int fscrypt_file_open (struct inode * inode , struct file * filp );
0 commit comments