diff options
author | Oleg Nesterov <oleg@tv-sign.ru> | 2006-06-23 05:05:55 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-06-23 10:43:07 -0400 |
commit | 626ab0e69d376fa07599af669af8ba92d58e87c1 (patch) | |
tree | a995e0231e61fab63568bc7bade81dc20c1dae09 /block/ll_rw_blk.c | |
parent | 54e73770357142e297c916c7865f5fca7499f69c (diff) |
[PATCH] list: use list_replace_init() instead of list_splice_init()
list_splice_init(list, head) does unneeded job if it is known that
list_empty(head) == 1. We can use list_replace_init() instead.
Signed-off-by: Oleg Nesterov <oleg@tv-sign.ru>
Acked-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'block/ll_rw_blk.c')
-rw-r--r-- | block/ll_rw_blk.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/block/ll_rw_blk.c b/block/ll_rw_blk.c index 7eb36c53f4b7..465b54312c59 100644 --- a/block/ll_rw_blk.c +++ b/block/ll_rw_blk.c | |||
@@ -3359,12 +3359,11 @@ EXPORT_SYMBOL(end_that_request_chunk); | |||
3359 | */ | 3359 | */ |
3360 | static void blk_done_softirq(struct softirq_action *h) | 3360 | static void blk_done_softirq(struct softirq_action *h) |
3361 | { | 3361 | { |
3362 | struct list_head *cpu_list; | 3362 | struct list_head *cpu_list, local_list; |
3363 | LIST_HEAD(local_list); | ||
3364 | 3363 | ||
3365 | local_irq_disable(); | 3364 | local_irq_disable(); |
3366 | cpu_list = &__get_cpu_var(blk_cpu_done); | 3365 | cpu_list = &__get_cpu_var(blk_cpu_done); |
3367 | list_splice_init(cpu_list, &local_list); | 3366 | list_replace_init(cpu_list, &local_list); |
3368 | local_irq_enable(); | 3367 | local_irq_enable(); |
3369 | 3368 | ||
3370 | while (!list_empty(&local_list)) { | 3369 | while (!list_empty(&local_list)) { |