diff options
Diffstat (limited to 'block/elevator.c')
-rw-r--r-- | block/elevator.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/block/elevator.c b/block/elevator.c index dbbea73a8b10..96a61e029ce5 100644 --- a/block/elevator.c +++ b/block/elevator.c @@ -168,10 +168,12 @@ int elevator_init(request_queue_t *q, char *name) if (name && !(e = elevator_get(name))) return -EINVAL; - if (!e && !(e = elevator_get(chosen_elevator))) { - e = elevator_get(CONFIG_DEFAULT_IOSCHED); - if (*chosen_elevator) - printk("I/O scheduler %s not found\n", chosen_elevator); + if (!e && *chosen_elevator && !(e = elevator_get(chosen_elevator))) + printk("I/O scheduler %s not found\n", chosen_elevator); + + if (!e && !(e = elevator_get(CONFIG_DEFAULT_IOSCHED))) { + printk("Default I/O scheduler not found, using no-op\n"); + e = elevator_get("noop"); } eq = kmalloc(sizeof(struct elevator_queue), GFP_KERNEL); |