Skip to content

Commit 75798f8

Browse files
committed
fscrypt: remove loadable module related code
Since commit 643fa96 ("fscrypt: remove filesystem specific build config option"), fs/crypto/ can no longer be built as a loadable module. Thus it no longer needs a module_exit function, nor a MODULE_LICENSE. So remove them, and change module_init to late_initcall. Reviewed-by: Chandan Rajendra <chandan@linux.ibm.com> Signed-off-by: Eric Biggers <ebiggers@google.com>
1 parent e21a712 commit 75798f8

3 files changed

Lines changed: 1 addition & 26 deletions

File tree

‎fs/crypto/crypto.c‎

Lines changed: 1 addition & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -510,22 +510,4 @@ static int __init fscrypt_init(void)
510510
fail:
511511
return -ENOMEM;
512512
}
513-
module_init(fscrypt_init)
514-
515-
/**
516-
* fscrypt_exit() - Shutdown the fs encryption system
517-
*/
518-
static void __exit fscrypt_exit(void)
519-
{
520-
fscrypt_destroy();
521-
522-
if (fscrypt_read_workqueue)
523-
destroy_workqueue(fscrypt_read_workqueue);
524-
kmem_cache_destroy(fscrypt_ctx_cachep);
525-
kmem_cache_destroy(fscrypt_info_cachep);
526-
527-
fscrypt_essiv_cleanup();
528-
}
529-
module_exit(fscrypt_exit);
530-
531-
MODULE_LICENSE("GPL");
513+
late_initcall(fscrypt_init)

‎fs/crypto/fscrypt_private.h‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -166,6 +166,4 @@ struct fscrypt_mode {
166166
bool needs_essiv;
167167
};
168168

169-
extern void __exit fscrypt_essiv_cleanup(void);
170-
171169
#endif /* _FSCRYPT_PRIVATE_H */

‎fs/crypto/keyinfo.c‎

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -437,11 +437,6 @@ static int init_essiv_generator(struct fscrypt_info *ci, const u8 *raw_key,
437437
return err;
438438
}
439439

440-
void __exit fscrypt_essiv_cleanup(void)
441-
{
442-
crypto_free_shash(essiv_hash_tfm);
443-
}
444-
445440
/*
446441
* Given the encryption mode and key (normally the derived key, but for
447442
* FS_POLICY_FLAG_DIRECT_KEY mode it's the master key), set up the inode's

0 commit comments

Comments
 (0)