]> granicus.if.org Git - zfs/commitdiff
Fix inverted logic on none elevator comparison
authorColin Ian King <colin.king@canonical.com>
Thu, 14 Apr 2016 07:58:09 +0000 (08:58 +0100)
committerBrian Behlendorf <behlendorf1@llnl.gov>
Fri, 15 Apr 2016 19:18:08 +0000 (12:18 -0700)
Commit d1d7e2689db9e03f1 ("cstyle: Resolve C style issues") inverted
the logic on the none elevator comparison.  Fix this and make it
cstyle warning clean.

Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Closes #4507

module/zfs/vdev_disk.c

index ebf0e8bfeb8747f600f80e89e04efec01145a909..cdb8f78e27884d1d363746291a06c3026f99bd5e 100644 (file)
@@ -139,7 +139,7 @@ vdev_elevator_switch(vdev_t *v, char *elevator)
                return (0);
 
        /* Leave existing scheduler when set to "none" */
-       if (strncmp(elevator, "none", 4) && (strlen(elevator) == 4) == 0)
+       if ((strncmp(elevator, "none", 4) == 0) && (strlen(elevator) == 4))
                return (0);
 
 #ifdef HAVE_ELEVATOR_CHANGE