[PATCH -mm] cascade: use list_replace_init()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 <[email protected]>

--- 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 [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux