Commit cff3ba2204a0797b05150a4b2b7f40a55023d952
Committed by
Jens Axboe
1 parent
b8ea2cb512
Exists in
master
and in
4 other branches
[BLOCK] elevator init fixes #2
In addition to the first patch, which is probably goodness, I found the cause of my panic - applying this patch fixes it and now I am booting. If the chosen_elevator[] is not found, fall back to noop. Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Jens Axboe <axboe@suse.de>
Showing 1 changed file with 3 additions and 2 deletions Side-by-side Diff
block/elevator.c
| ... | ... | @@ -155,9 +155,10 @@ |
| 155 | 155 | /* |
| 156 | 156 | * If the given scheduler is not available, fall back to no-op. |
| 157 | 157 | */ |
| 158 | - if (!(e = elevator_find(chosen_elevator))) | |
| 158 | + if ((e = elevator_find(chosen_elevator))) | |
| 159 | + elevator_put(e); | |
| 160 | + else | |
| 159 | 161 | strcpy(chosen_elevator, "noop"); |
| 160 | - elevator_put(e); | |
| 161 | 162 | } |
| 162 | 163 | |
| 163 | 164 | static int __init elevator_setup(char *str) |