diff options
author | Brian Behlendorf <[email protected]> | 2015-02-18 15:24:15 -0800 |
---|---|---|
committer | Brian Behlendorf <[email protected]> | 2015-02-27 13:43:39 -0800 |
commit | c1bc8e610be8bf1cc8170f788a89a9ee257eb51f (patch) | |
tree | 1500d76f5534ba22388e2bc73fe2fc52d2cbf164 /module/spl/spl-generic.c | |
parent | 086476f92005506cb07e75f889e8ddb69026e842 (diff) |
Retire spl_module_init()/spl_module_fini()
In the original implementation of the SPL wrappers were provided
for module initialization and cleanup. This was done to abstract
away any compatibility code which might be needed for the SPL.
As it turned out the only significant compatibility issue was that
the default pwd during module load differed under Illumos and Linux.
Since this is such as minor thing and the wrappers complicate the
code they are being retired.
Signed-off-by: Brian Behlendorf <[email protected]>
Issue zfsonlinux/zfs#2985
Diffstat (limited to 'module/spl/spl-generic.c')
-rw-r--r-- | module/spl/spl-generic.c | 32 |
1 files changed, 4 insertions, 28 deletions
diff --git a/module/spl/spl-generic.c b/module/spl/spl-generic.c index 4056c4e42..4d9846cf5 100644 --- a/module/spl/spl-generic.c +++ b/module/spl/spl-generic.c @@ -518,8 +518,8 @@ spl_kvmem_fini(void) spl_kmem_fini(); } -static int -__init spl_init(void) +static int __init +spl_init(void) { int rc = 0; @@ -575,10 +575,10 @@ out1: "v%s-%s%s, rc = %d\n", SPL_META_VERSION, SPL_META_RELEASE, SPL_DEBUG_STR, rc); - return rc; + return (rc); } -static void +static void __exit spl_fini(void) { printk(KERN_NOTICE "SPL: Unloaded module v%s-%s%s\n", @@ -594,30 +594,6 @@ spl_fini(void) spl_kvmem_fini(); } -/* Called when a dependent module is loaded */ -void -spl_setup(void) -{ - int rc; - - /* - * At module load time the pwd is set to '/' on a Solaris system. - * On a Linux system will be set to whatever directory the caller - * was in when executing insmod/modprobe. - */ - rc = vn_set_pwd("/"); - if (rc) - printk("SPL: Warning unable to set pwd to '/': %d\n", rc); -} -EXPORT_SYMBOL(spl_setup); - -/* Called when a dependent module is unloaded */ -void -spl_cleanup(void) -{ -} -EXPORT_SYMBOL(spl_cleanup); - module_init(spl_init); module_exit(spl_fini); |