[PATCH -mm] cascade: use list_replace_init()

From: Oleg Nesterov
Date: Wed May 17 2006 - 17:43:26 EST


On top of Porpoise's
when-config_base_samll=1-the-kernel-261611-cascade-in-kernel-timerc-may-enter-the-infinite-loop.patch

Microoptimization, cascade() can use list_replace_init()
instead of list_splice_init().

Signed-off-by: Oleg Nesterov <oleg@xxxxxxxxxx>

--- MM/kernel/timer.c~ 2006-05-15 00:03:53.000000000 +0400
+++ MM/kernel/timer.c 2006-05-18 05:12:35.000000000 +0400
@@ -385,9 +385,9 @@ static int cascade(tvec_base_t *base, tv
{
/* cascade all the timers from tv up one level */
struct timer_list *timer, *tmp;
- LIST_HEAD(tv_list);
+ struct list_head tv_list;

- list_splice_init(tv->vec + index, &tv_list);
+ list_replace_init(tv->vec + index, &tv_list);

/*
* We are removing _all_ timers from the list, so we

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/