Commit 75798f85 authored by Eric Biggers's avatar Eric Biggers

fscrypt: remove loadable module related code

Since commit 643fa961 ("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: default avatarChandan Rajendra <chandan@linux.ibm.com>
Signed-off-by: default avatarEric Biggers <ebiggers@google.com>
parent e21a712a
...@@ -510,22 +510,4 @@ static int __init fscrypt_init(void) ...@@ -510,22 +510,4 @@ static int __init fscrypt_init(void)
fail: fail:
return -ENOMEM; return -ENOMEM;
} }
module_init(fscrypt_init) late_initcall(fscrypt_init)
/**
* fscrypt_exit() - Shutdown the fs encryption system
*/
static void __exit fscrypt_exit(void)
{
fscrypt_destroy();
if (fscrypt_read_workqueue)
destroy_workqueue(fscrypt_read_workqueue);
kmem_cache_destroy(fscrypt_ctx_cachep);
kmem_cache_destroy(fscrypt_info_cachep);
fscrypt_essiv_cleanup();
}
module_exit(fscrypt_exit);
MODULE_LICENSE("GPL");
...@@ -166,6 +166,4 @@ struct fscrypt_mode { ...@@ -166,6 +166,4 @@ struct fscrypt_mode {
bool needs_essiv; bool needs_essiv;
}; };
extern void __exit fscrypt_essiv_cleanup(void);
#endif /* _FSCRYPT_PRIVATE_H */ #endif /* _FSCRYPT_PRIVATE_H */
...@@ -437,11 +437,6 @@ static int init_essiv_generator(struct fscrypt_info *ci, const u8 *raw_key, ...@@ -437,11 +437,6 @@ static int init_essiv_generator(struct fscrypt_info *ci, const u8 *raw_key,
return err; return err;
} }
void __exit fscrypt_essiv_cleanup(void)
{
crypto_free_shash(essiv_hash_tfm);
}
/* /*
* Given the encryption mode and key (normally the derived key, but for * Given the encryption mode and key (normally the derived key, but for
* FS_POLICY_FLAG_DIRECT_KEY mode it's the master key), set up the inode's * FS_POLICY_FLAG_DIRECT_KEY mode it's the master key), set up the inode's
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment