Skip to contentSkip to conversation

CIFS: Remove __exit mark from cifs_exit_dns_resolver()

PATCH In review David Howells 2 participants 3 messages Jul 30, 2010 – Aug 2, 2010

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 CIFS: Remove __exit mark from cifs_exit_dns_resolver()

Remove the __exit mark from cifs_exit_dns_resolver() as it's called by the module init routine in case of error, and so may have been discarded during linkage.

---

 fs/cifs/dns_resolve.c |    2 +-
 fs/cifs/dns_resolve.h |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
fs/cifs/dns_resolve.c +1 -1
index 49315cb..853a968 100644
@@ -227,7 +227,7 @@ failed_put_cred:
 	return ret;
 }
 
-void __exit cifs_exit_dns_resolver(void)
+void cifs_exit_dns_resolver(void)
 {
 	key_revoke(dns_resolver_cache->thread_keyring);
 	unregister_key_type(&key_type_dns_resolver);
fs/cifs/dns_resolve.h +1 -1
index 26b9eaa..5d7f291 100644
@@ -25,7 +25,7 @@
 
 #ifdef __KERNEL__
 extern int __init cifs_init_dns_resolver(void);
-extern void __exit cifs_exit_dns_resolver(void);
+extern void cifs_exit_dns_resolver(void);
 extern int dns_resolve_server_name_to_ip(const char *unc, char **ip_addr);
 #endif /* KERNEL */
 
#1 lore raw

Hello,

Quoted 3 lines · David Howells

Remove the __exit mark from cifs_exit_dns_resolver() as it's called by the module init routine in case of error, and so may have been discarded during linkage.

From time to time I think about introducing something like __init_or_exit that puts a function into .init.text if .exit.text is discarded. Is it worth the effort?

Best regards
Uwe

Signature · 2 lines
Pengutronix e.K.                           | Uwe Kleine-König            |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
#2 lore raw
Quoted 3 lines · Uwe Kleine-König

From time to time I think about introducing something like __init_or_exit that puts a function into .init.text if .exit.text is discarded. Is it worth the effort?

It might be worth including __exit stuff in __init if we would otherwise have discarded it. Otherwise there's liable to be a bunch of stuff that we could otherwise discard left hanging around permanently. But your suggestion would work too.

David