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 <behlendorf1@llnl.gov>
Issue zfsonlinux/zfs#2985
This commit is contained in:
Brian Behlendorf
2015-02-18 15:24:15 -08:00
parent 086476f920
commit c1bc8e610b
4 changed files with 8 additions and 95 deletions
+4 -28
View File
@@ -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);