Skip to content

Commit

Permalink
ecryptfs: properly mark init functions
Browse files Browse the repository at this point in the history
Some ecryptfs init functions are not prefixed by __init and thus not
freed after initialization. This patch saved about 1kB in ecryptfs
module.

Signed-off-by: Jerome Marchand <[email protected]>
Signed-off-by: Tyler Hicks <[email protected]>
  • Loading branch information
jeromemarchand authored and Tyler Hicks committed Aug 27, 2010
1 parent f137f15 commit 7371a38
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion fs/ecryptfs/crypto.c
Original file line number Diff line number Diff line change
Expand Up @@ -1793,7 +1793,7 @@ struct kmem_cache *ecryptfs_key_tfm_cache;
static struct list_head key_tfm_list;
struct mutex key_tfm_list_mutex;

int ecryptfs_init_crypto(void)
int __init ecryptfs_init_crypto(void)
{
mutex_init(&key_tfm_list_mutex);
INIT_LIST_HEAD(&key_tfm_list);
Expand Down
2 changes: 1 addition & 1 deletion fs/ecryptfs/kthread.c
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ static int ecryptfs_threadfn(void *ignored)
return 0;
}

int ecryptfs_init_kthread(void)
int __init ecryptfs_init_kthread(void)
{
int rc = 0;

Expand Down
2 changes: 1 addition & 1 deletion fs/ecryptfs/messaging.c
Original file line number Diff line number Diff line change
Expand Up @@ -473,7 +473,7 @@ int ecryptfs_wait_for_response(struct ecryptfs_msg_ctx *msg_ctx,
return rc;
}

int ecryptfs_init_messaging(void)
int __init ecryptfs_init_messaging(void)
{
int i;
int rc = 0;
Expand Down
2 changes: 1 addition & 1 deletion fs/ecryptfs/miscdev.c
Original file line number Diff line number Diff line change
Expand Up @@ -500,7 +500,7 @@ static struct miscdevice ecryptfs_miscdev = {
*
* Returns zero on success; non-zero otherwise
*/
int ecryptfs_init_ecryptfs_miscdev(void)
int __init ecryptfs_init_ecryptfs_miscdev(void)
{
int rc;

Expand Down

0 comments on commit 7371a38

Please sign in to comment.