summaryrefslogtreecommitdiffstats
path: root/module/zfs
diff options
context:
space:
mode:
authorBrian Behlendorf <[email protected]>2015-11-16 15:00:38 -0800
committerBrian Behlendorf <[email protected]>2015-11-16 16:10:06 -0800
commit3d8d245fb3f1724488c972658da2aab9e8528210 (patch)
tree61f1df3da015a556f068e6443a53bf34fe3740d5 /module/zfs
parent256fa983f46603df3f26c1508ca3a09f6316f36d (diff)
Follow 0/-E convention for module load errors
Because errors during module load are so rare it went unnoticed that it was possible that a positive errno was returned. This would result in the module being loaded, nothing being initialized, and a system panic shortly thereafter. This is what was causing the hard failures in the automated testing. Signed-off-by: Brian Behlendorf <[email protected]>
Diffstat (limited to 'module/zfs')
-rw-r--r--module/zfs/zfs_ioctl.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/module/zfs/zfs_ioctl.c b/module/zfs/zfs_ioctl.c
index 7ce19693e..d026e92d6 100644
--- a/module/zfs/zfs_ioctl.c
+++ b/module/zfs/zfs_ioctl.c
@@ -6011,7 +6011,7 @@ _init(void)
{
int error;
- error = vn_set_pwd("/");
+ error = -vn_set_pwd("/");
if (error) {
printk(KERN_NOTICE
"ZFS: Warning unable to set pwd to '/': %d\n", error);
@@ -6021,7 +6021,7 @@ _init(void)
spa_init(FREAD | FWRITE);
zfs_init();
- if ((error = zvol_init()) != 0)
+ if ((error = -zvol_init()) != 0)
goto out1;
zfs_ioctl_init();