summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZachary Amsden <zach@vmware.com>2005-11-09 13:24:20 +0100
committerJens Axboe <axboe@nelson.home.kernel.dk>2005-11-12 10:55:05 +0100
commitcff3ba2204a0797b05150a4b2b7f40a55023d952 (patch)
tree56d3527958ec1aee1f2c0b185134883095175012
parentb8ea2cb5120a92fe63053a2896be42abbb919a76 (diff)
downloadop-kernel-dev-cff3ba2204a0797b05150a4b2b7f40a55023d952.zip
op-kernel-dev-cff3ba2204a0797b05150a4b2b7f40a55023d952.tar.gz
[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>
-rw-r--r--block/elevator.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/block/elevator.c b/block/elevator.c
index 23cfbe5..e58928e 100644
--- a/block/elevator.c
+++ b/block/elevator.c
@@ -155,9 +155,10 @@ static void elevator_setup_default(void)
/*
* If the given scheduler is not available, fall back to no-op.
*/
- if (!(e = elevator_find(chosen_elevator)))
+ if ((e = elevator_find(chosen_elevator)))
+ elevator_put(e);
+ else
strcpy(chosen_elevator, "noop");
- elevator_put(e);
}
static int __init elevator_setup(char *str)
OpenPOWER on IntegriCloud