Skip to contentSkip to conversation

cascade: use list_replace_init()

PATCH New Oleg Nesterov 1 participant 1 message May 17, 2006 1 message not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

#1 lore raw

PATCH 1/1 cascade: use list_replace_init()

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().

kernel/timer.c renamed from kernel/timer.c~ +2 -2
@@ -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