@@ -210,18 +210,18 @@ struct fscrypt_prepared_key {
210210};
211211
212212/*
213- * fscrypt_info - the "encryption key" for an inode
213+ * fscrypt_inode_info - the "encryption key" for an inode
214214 *
215215 * When an encrypted file's key is made available, an instance of this struct is
216216 * allocated and stored in ->i_crypt_info. Once created, it remains until the
217217 * inode is evicted.
218218 */
219- struct fscrypt_info {
219+ struct fscrypt_inode_info {
220220
221221 /* The key in a form prepared for actual encryption/decryption */
222222 struct fscrypt_prepared_key ci_enc_key ;
223223
224- /* True if ci_enc_key should be freed when this fscrypt_info is freed */
224+ /* True if ci_enc_key should be freed when this struct is freed */
225225 bool ci_owns_key ;
226226
227227#ifdef CONFIG_FS_ENCRYPTION_INLINE_CRYPT
@@ -294,9 +294,9 @@ typedef enum {
294294} fscrypt_direction_t ;
295295
296296/* crypto.c */
297- extern struct kmem_cache * fscrypt_info_cachep ;
297+ extern struct kmem_cache * fscrypt_inode_info_cachep ;
298298int fscrypt_initialize (struct super_block * sb );
299- int fscrypt_crypt_data_unit (const struct fscrypt_info * ci ,
299+ int fscrypt_crypt_data_unit (const struct fscrypt_inode_info * ci ,
300300 fscrypt_direction_t rw , u64 index ,
301301 struct page * src_page , struct page * dest_page ,
302302 unsigned int len , unsigned int offs ,
@@ -326,7 +326,7 @@ union fscrypt_iv {
326326};
327327
328328void fscrypt_generate_iv (union fscrypt_iv * iv , u64 index ,
329- const struct fscrypt_info * ci );
329+ const struct fscrypt_inode_info * ci );
330330
331331/*
332332 * Return the number of bits used by the maximum file data unit index that is
@@ -374,17 +374,17 @@ void fscrypt_destroy_hkdf(struct fscrypt_hkdf *hkdf);
374374
375375/* inline_crypt.c */
376376#ifdef CONFIG_FS_ENCRYPTION_INLINE_CRYPT
377- int fscrypt_select_encryption_impl (struct fscrypt_info * ci );
377+ int fscrypt_select_encryption_impl (struct fscrypt_inode_info * ci );
378378
379379static inline bool
380- fscrypt_using_inline_encryption (const struct fscrypt_info * ci )
380+ fscrypt_using_inline_encryption (const struct fscrypt_inode_info * ci )
381381{
382382 return ci -> ci_inlinecrypt ;
383383}
384384
385385int fscrypt_prepare_inline_crypt_key (struct fscrypt_prepared_key * prep_key ,
386386 const u8 * raw_key ,
387- const struct fscrypt_info * ci );
387+ const struct fscrypt_inode_info * ci );
388388
389389void fscrypt_destroy_inline_crypt_key (struct super_block * sb ,
390390 struct fscrypt_prepared_key * prep_key );
@@ -395,7 +395,7 @@ void fscrypt_destroy_inline_crypt_key(struct super_block *sb,
395395 */
396396static inline bool
397397fscrypt_is_key_prepared (struct fscrypt_prepared_key * prep_key ,
398- const struct fscrypt_info * ci )
398+ const struct fscrypt_inode_info * ci )
399399{
400400 /*
401401 * The two smp_load_acquire()'s here pair with the smp_store_release()'s
@@ -412,21 +412,21 @@ fscrypt_is_key_prepared(struct fscrypt_prepared_key *prep_key,
412412
413413#else /* CONFIG_FS_ENCRYPTION_INLINE_CRYPT */
414414
415- static inline int fscrypt_select_encryption_impl (struct fscrypt_info * ci )
415+ static inline int fscrypt_select_encryption_impl (struct fscrypt_inode_info * ci )
416416{
417417 return 0 ;
418418}
419419
420420static inline bool
421- fscrypt_using_inline_encryption (const struct fscrypt_info * ci )
421+ fscrypt_using_inline_encryption (const struct fscrypt_inode_info * ci )
422422{
423423 return false;
424424}
425425
426426static inline int
427427fscrypt_prepare_inline_crypt_key (struct fscrypt_prepared_key * prep_key ,
428428 const u8 * raw_key ,
429- const struct fscrypt_info * ci )
429+ const struct fscrypt_inode_info * ci )
430430{
431431 WARN_ON_ONCE (1 );
432432 return - EOPNOTSUPP ;
@@ -440,7 +440,7 @@ fscrypt_destroy_inline_crypt_key(struct super_block *sb,
440440
441441static inline bool
442442fscrypt_is_key_prepared (struct fscrypt_prepared_key * prep_key ,
443- const struct fscrypt_info * ci )
443+ const struct fscrypt_inode_info * ci )
444444{
445445 return smp_load_acquire (& prep_key -> tfm ) != NULL ;
446446}
@@ -640,17 +640,18 @@ struct fscrypt_mode {
640640extern struct fscrypt_mode fscrypt_modes [];
641641
642642int fscrypt_prepare_key (struct fscrypt_prepared_key * prep_key ,
643- const u8 * raw_key , const struct fscrypt_info * ci );
643+ const u8 * raw_key , const struct fscrypt_inode_info * ci );
644644
645645void fscrypt_destroy_prepared_key (struct super_block * sb ,
646646 struct fscrypt_prepared_key * prep_key );
647647
648- int fscrypt_set_per_file_enc_key (struct fscrypt_info * ci , const u8 * raw_key );
648+ int fscrypt_set_per_file_enc_key (struct fscrypt_inode_info * ci ,
649+ const u8 * raw_key );
649650
650- int fscrypt_derive_dirhash_key (struct fscrypt_info * ci ,
651+ int fscrypt_derive_dirhash_key (struct fscrypt_inode_info * ci ,
651652 const struct fscrypt_master_key * mk );
652653
653- void fscrypt_hash_inode_number (struct fscrypt_info * ci ,
654+ void fscrypt_hash_inode_number (struct fscrypt_inode_info * ci ,
654655 const struct fscrypt_master_key * mk );
655656
656657int fscrypt_get_encryption_info (struct inode * inode , bool allow_unsupported );
@@ -685,10 +686,11 @@ static inline int fscrypt_require_key(struct inode *inode)
685686
686687void fscrypt_put_direct_key (struct fscrypt_direct_key * dk );
687688
688- int fscrypt_setup_v1_file_key (struct fscrypt_info * ci ,
689+ int fscrypt_setup_v1_file_key (struct fscrypt_inode_info * ci ,
689690 const u8 * raw_master_key );
690691
691- int fscrypt_setup_v1_file_key_via_subscribed_keyrings (struct fscrypt_info * ci );
692+ int fscrypt_setup_v1_file_key_via_subscribed_keyrings (
693+ struct fscrypt_inode_info * ci );
692694
693695/* policy.c */
694696
0 commit comments