Skip to content

Commit

Permalink
dlm: add __init and __exit marks to init and exit functions
Browse files Browse the repository at this point in the history
it moves 365 bytes from .text to .init.text, and 30 bytes from .text to
.exit.text, saves memory.

Signed-off-by: Denis Cheng <crquan@gmail.com>
Signed-off-by: David Teigland <teigland@redhat.com>
  • Loading branch information
Denis Cheng authored and David Teigland committed Feb 7, 2008
1 parent d292c0c commit 3072717
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion fs/dlm/config.c
Original file line number Diff line number Diff line change
Expand Up @@ -604,7 +604,7 @@ static struct clusters clusters_root = {
},
};

int dlm_config_init(void)
int __init dlm_config_init(void)
{
config_group_init(&clusters_root.subsys.su_group);
mutex_init(&clusters_root.subsys.su_mutex);
Expand Down
2 changes: 1 addition & 1 deletion fs/dlm/debug_fs.c
Original file line number Diff line number Diff line change
Expand Up @@ -541,7 +541,7 @@ void dlm_delete_debug_file(struct dlm_ls *ls)
debugfs_remove(ls->ls_debug_locks_dentry);
}

int dlm_register_debugfs(void)
int __init dlm_register_debugfs(void)
{
mutex_init(&debug_buf_lock);
dlm_root = debugfs_create_dir("dlm", NULL);
Expand Down
2 changes: 1 addition & 1 deletion fs/dlm/lockspace.c
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ static int do_uevent(struct dlm_ls *ls, int in)
}


int dlm_lockspace_init(void)
int __init dlm_lockspace_init(void)
{
ls_count = 0;
mutex_init(&ls_lock);
Expand Down
2 changes: 1 addition & 1 deletion fs/dlm/memory.c
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
static struct kmem_cache *lkb_cache;


int dlm_memory_init(void)
int __init dlm_memory_init(void)
{
int ret = 0;

Expand Down
4 changes: 2 additions & 2 deletions fs/dlm/netlink.c
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ static struct genl_ops dlm_nl_ops = {
.doit = user_cmd,
};

int dlm_netlink_init(void)
int __init dlm_netlink_init(void)
{
int rv;

Expand All @@ -95,7 +95,7 @@ int dlm_netlink_init(void)
return rv;
}

void dlm_netlink_exit(void)
void __exit dlm_netlink_exit(void)
{
genl_unregister_ops(&family, &dlm_nl_ops);
genl_unregister_family(&family);
Expand Down
2 changes: 1 addition & 1 deletion fs/dlm/user.c
Original file line number Diff line number Diff line change
Expand Up @@ -902,7 +902,7 @@ static struct miscdevice ctl_device = {
.minor = MISC_DYNAMIC_MINOR,
};

int dlm_user_init(void)
int __init dlm_user_init(void)
{
int error;

Expand Down

0 comments on commit 3072717

Please sign in to comment.