]> granicus.if.org Git - zfs/commitdiff
Follow 0/-E convention for module load errors
authorBrian Behlendorf <behlendorf1@llnl.gov>
Mon, 16 Nov 2015 23:00:38 +0000 (15:00 -0800)
committerBrian Behlendorf <behlendorf1@llnl.gov>
Tue, 17 Nov 2015 00:10:06 +0000 (16:10 -0800)
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 <behlendorf1@llnl.gov>
TEST
module/zfs/zfs_ioctl.c

diff --git a/TEST b/TEST
index 05818faf7e5cd6b8adf685b44a77391a106dc376..eba35a37dcfda207c4124e6d41db7771c097f57c 100644 (file)
--- a/TEST
+++ b/TEST
@@ -71,14 +71,10 @@ case "$BB_NAME" in
 Amazon*)
     ;;
 CentOS*)
-    # Fails vnode:vn_rdwr, CentOS 6.
-    TEST_SPLAT_SKIP="yes"
     # Sporadic segmentation faults
     TEST_ZTEST_SKIP="yes"
     # Sporadic VERIFY(!zilog_is_dirty(zilog)) failed
     TEST_ZILTEST_SKIP="yes"
-    # Hangs loading modules
-    TEST_ZCONFIG_SKIP="yes"
     ;;
 Debian*)
     ;;
index 7ce19693e2d40fc596271dfddac407e1073df001..d026e92d693426337f482da5264dc4216c801664 100644 (file)
@@ -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();