elevator: remove redundant warnings on IO scheduler switch
authorJens Axboe <axboe@fb.com>
Wed, 10 May 2017 13:40:04 +0000 (07:40 -0600)
committerJens Axboe <axboe@fb.com>
Wed, 10 May 2017 13:40:04 +0000 (07:40 -0600)
We warn twice for switching to a scheduler, if that switch fails.
As we also report the failure in the return value to the
sysfs write, remove the dmesg induced failures.

Keep the failure print for warning to switch to the kconfig
selected IO scheduler, as we can't report errors for that in
any other way.

Signed-off-by: Jens Axboe <axboe@fb.com>
block/elevator.c

index ab726a5..dac99fb 100644 (file)
@@ -1062,10 +1062,8 @@ static int __elevator_change(struct request_queue *q, const char *name)
 
        strlcpy(elevator_name, name, sizeof(elevator_name));
        e = elevator_get(strstrip(elevator_name), true);
-       if (!e) {
-               printk(KERN_ERR "elevator: type %s not found\n", elevator_name);
+       if (!e)
                return -EINVAL;
-       }
 
        if (q->elevator &&
            !strcmp(elevator_name, q->elevator->type->elevator_name)) {
@@ -1105,7 +1103,6 @@ ssize_t elv_iosched_store(struct request_queue *q, const char *name,
        if (!ret)
                return count;
 
-       printk(KERN_ERR "elevator: switch to %s failed\n", name);
        return ret;
 }