[PATCH 4/4] perf_counter: use list_move_tail
From: Peter Zijlstra
Date: Tue Mar 10 2009 - 10:22:51 EST
Instead of del/add use a move list-op.
Signed-off-by: Peter Zijlstra <a.p.zijlstra@xxxxxxxxx>
---
kernel/perf_counter.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
Index: linux-2.6/kernel/perf_counter.c
===================================================================
--- linux-2.6.orig/kernel/perf_counter.c
+++ linux-2.6/kernel/perf_counter.c
@@ -89,8 +89,7 @@ list_del_counter(struct perf_counter *co
list_for_each_entry_safe(sibling, tmp,
&counter->sibling_list, list_entry) {
- list_del_init(&sibling->list_entry);
- list_add_tail(&sibling->list_entry, &ctx->counter_list);
+ list_move_tail(&sibling->list_entry, &ctx->counter_list);
sibling->group_leader = sibling;
}
}
--
--
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/