diff options
author | Brian Behlendorf <[email protected]> | 2015-02-18 15:39:05 -0800 |
---|---|---|
committer | Brian Behlendorf <[email protected]> | 2015-02-24 11:37:44 -0800 |
commit | b4f3666a16a61aa2ac7dca0b199e7ce51edbcd60 (patch) | |
tree | 4ba07df5014ed7b83c71563b1d4e7b1138ee36cf /module/zfs/zfs_ioctl.c | |
parent | 1efdc45ea805e61de2c54736cd1b2a4a5f48a913 (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]>
Closes #2985
Diffstat (limited to 'module/zfs/zfs_ioctl.c')
-rw-r--r-- | module/zfs/zfs_ioctl.c | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/module/zfs/zfs_ioctl.c b/module/zfs/zfs_ioctl.c index 171e08c7a..998ee1596 100644 --- a/module/zfs/zfs_ioctl.c +++ b/module/zfs/zfs_ioctl.c @@ -186,7 +186,6 @@ #include <sys/zfeature.h> #include <linux/miscdevice.h> -#include <linux/module_compat.h> #include "zfs_namecheck.h" #include "zfs_prop.h" @@ -5954,11 +5953,18 @@ zfs_allow_log_destroy(void *arg) #define ZFS_DEBUG_STR "" #endif -int +static int __init _init(void) { int error; + error = vn_set_pwd("/"); + if (error) { + printk(KERN_NOTICE + "ZFS: Warning unable to set pwd to '/': %d\n", error); + return (error); + } + spa_init(FREAD | FWRITE); zfs_init(); @@ -5996,7 +6002,7 @@ out1: return (error); } -int +static void __exit _fini(void) { zfs_detach(); @@ -6010,13 +6016,11 @@ _fini(void) printk(KERN_NOTICE "ZFS: Unloaded module v%s-%s%s\n", ZFS_META_VERSION, ZFS_META_RELEASE, ZFS_DEBUG_STR); - - return (0); } #ifdef HAVE_SPL -spl_module_init(_init); -spl_module_exit(_fini); +module_init(_init); +module_exit(_fini); MODULE_DESCRIPTION("ZFS"); MODULE_AUTHOR(ZFS_META_AUTHOR); |