fscrypt: remove loadable module related code
authorEric Biggers <ebiggers@google.com>
Wed, 24 Jul 2019 18:07:57 +0000 (11:07 -0700)
committerEric Biggers <ebiggers@google.com>
Tue, 13 Aug 2019 02:04:41 +0000 (19:04 -0700)
Since commit 643fa9612bf1 ("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>
fs/crypto/crypto.c
fs/crypto/fscrypt_private.h
fs/crypto/keyinfo.c

index 45c3d04..d52c788 100644 (file)
@@ -510,22 +510,4 @@ fail_free_queue:
 fail:
        return -ENOMEM;
 }
-module_init(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");
+late_initcall(fscrypt_init)
index 8978eec..2241782 100644 (file)
@@ -166,6 +166,4 @@ struct fscrypt_mode {
        bool needs_essiv;
 };
 
-extern void __exit fscrypt_essiv_cleanup(void);
-
 #endif /* _FSCRYPT_PRIVATE_H */
index 207ebed..9bcadc0 100644 (file)
@@ -437,11 +437,6 @@ out:
        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
  * FS_POLICY_FLAG_DIRECT_KEY mode it's the master key), set up the inode's