aboutsummaryrefslogtreecommitdiff
path: root/block/elevator.c
diff options
context:
space:
mode:
Diffstat (limited to 'block/elevator.c')
-rw-r--r--block/elevator.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/block/elevator.c b/block/elevator.c
index dbbea73a8b1..96a61e029ce 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);