From: Chuck Ebbert <76306.1226@compuserve.com> Date: Tue, 17 Jan 2006 06:14:55 +0000 (-0800) Subject: [PATCH] elevator=as back-compatibility X-Git-Url: http://git.cdn.openwrt.org/?a=commitdiff_plain;h=4c2645830e29c082217662e7486572e9637e9f1d;p=openwrt%2Fstaging%2Fblogic.git [PATCH] elevator=as back-compatibility As of 2.6.15 you need to use "anticipatory" instead of "as". Fix that up so that `elevator=as' still works. Signed-off-by: Chuck Ebbert <76306.1226@compuserve.com> Cc: Nick Piggin Cc: Jens Axboe Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/block/elevator.c b/block/elevator.c index 1d0759178e4b..e8025b2ec54a 100644 --- a/block/elevator.c +++ b/block/elevator.c @@ -149,6 +149,13 @@ static void elevator_setup_default(void) if (!chosen_elevator[0]) strcpy(chosen_elevator, CONFIG_DEFAULT_IOSCHED); + /* + * Be backwards-compatible with previous kernels, so users + * won't get the wrong elevator. + */ + if (!strcmp(chosen_elevator, "as")) + strcpy(chosen_elevator, "anticipatory"); + /* * If the given scheduler is not available, fall back to no-op. */