Re: + elevator-init-fixes.patch added to -mm tree

From: Zachary Amsden
Date: Tue Nov 08 2005 - 13:38:11 EST


akpm@xxxxxxxx wrote:

The patch titled

Elevator init fixes

has been added to the -mm tree. Its filename is

elevator-init-fixes.patch



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.


Index: linux-2.6.14/drivers/block/elevator.c
===================================================================
--- linux-2.6.14.orig/drivers/block/elevator.c 2005-11-07 08:07:15.000000000 -0800
+++ linux-2.6.14/drivers/block/elevator.c 2005-11-08 02:14:35.727328656 -0800
@@ -155,9 +155,10 @@
/*
* 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)