aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--block/elevator.c10
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)
168 if (name && !(e = elevator_get(name))) 168 if (name && !(e = elevator_get(name)))
169 return -EINVAL; 169 return -EINVAL;
170 170
171 if (!e && !(e = elevator_get(chosen_elevator))) { 171 if (!e && *chosen_elevator && !(e = elevator_get(chosen_elevator)))
172 e = elevator_get(CONFIG_DEFAULT_IOSCHED); 172 printk("I/O scheduler %s not found\n", chosen_elevator);
173 if (*chosen_elevator) 173
174 printk("I/O scheduler %s not found\n", chosen_elevator); 174 if (!e && !(e = elevator_get(CONFIG_DEFAULT_IOSCHED))) {
175 printk("Default I/O scheduler not found, using no-op\n");
176 e = elevator_get("noop");
175 } 177 }
176 178
177 eq = kmalloc(sizeof(struct elevator_queue), GFP_KERNEL); 179 eq = kmalloc(sizeof(struct elevator_queue), GFP_KERNEL);