Skip to contentSkip to conversation

fs/dlm/: add __init and __exit marks to init and exit functions

PATCH New Denis Cheng 1 participant 1 message Feb 1, 2008 Distributed lock manager (DLM)

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 fs/dlm/: add __init and __exit marks to init and exit functions

it moves 365 bytes from .text to .init.text, and 30 bytes from .text to .exit.text, saves memory.

---
 fs/dlm/config.c    |    2 +-
 fs/dlm/debug_fs.c  |    2 +-
 fs/dlm/lockspace.c |    2 +-
 fs/dlm/memory.c    |    2 +-
 fs/dlm/netlink.c   |    4 ++--
 fs/dlm/user.c      |    2 +-
 6 files changed, 7 insertions(+), 7 deletions(-)
fs/dlm/config.c +1 -1
index 2f8e3c8..c3ad1df 100644
@@ -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);
fs/dlm/debug_fs.c +1 -1
index 12c3bfd..d2f98d8 100644
@@ -543,7 +543,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);
fs/dlm/lockspace.c +1 -1
index b180fdc..b64e55e 100644
@@ -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);
fs/dlm/memory.c +1 -1
index f778386..6273109 100644
@@ -18,7 +18,7 @@
 static struct kmem_cache *lkb_cache;
 
 
-int dlm_memory_init(void)
+int __init dlm_memory_init(void)
 {
 	int ret = 0;
 
fs/dlm/netlink.c +2 -2
index 863b87d..745218c 100644
@@ -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;
 
@@ -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);
fs/dlm/user.c +1 -1
index 7cbc682..0bf8dfe 100644
@@ -907,7 +907,7 @@ static struct miscdevice ctl_device = {
 	.minor = MISC_DYNAMIC_MINOR,
 };
 
-int dlm_user_init(void)
+int __init dlm_user_init(void)
 {
 	int error;
 
Signature · 1 line
1.5.3.8