CIFS: Remove __exit mark from cifs_exit_dns_resolver()
Subsystems (2)
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
@@ -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
@@ -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 */
Hello,
Quoted 3 lines · David Howells
Remove the
__exitmark fromcifs_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/ |
Quoted 3 lines · Uwe Kleine-König
From time to time I think about introducing something like
__init_or_exitthat 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