From: Colin Ian King Date: Thu, 14 Apr 2016 07:58:09 +0000 (+0100) Subject: Fix inverted logic on none elevator comparison X-Git-Tag: zfs-0.7.0-rc1~196 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=4903926f892ee10ead9571334efd43e80347b6f1;p=zfs Fix inverted logic on none elevator comparison 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 Signed-off-by: Brian Behlendorf Closes #4507 --- diff --git a/module/zfs/vdev_disk.c b/module/zfs/vdev_disk.c index ebf0e8bfe..cdb8f78e2 100644 --- a/module/zfs/vdev_disk.c +++ b/module/zfs/vdev_disk.c @@ -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