diff options
author | Oleg Nesterov <oleg@tv-sign.ru> | 2006-06-23 02:05:55 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-06-23 07:43:07 -0700 |
commit | 626ab0e69d376fa07599af669af8ba92d58e87c1 (patch) | |
tree | a995e0231e61fab63568bc7bade81dc20c1dae09 /arch | |
parent | 54e73770357142e297c916c7865f5fca7499f69c (diff) | |
download | kernel-common-626ab0e69d376fa07599af669af8ba92d58e87c1.tar.gz kernel-common-626ab0e69d376fa07599af669af8ba92d58e87c1.tar.bz2 kernel-common-626ab0e69d376fa07599af669af8ba92d58e87c1.zip |
[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 'arch')
-rw-r--r-- | arch/i386/mm/pageattr.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/arch/i386/mm/pageattr.c b/arch/i386/mm/pageattr.c index 92c3d9f0e731..0887b34bc59b 100644 --- a/arch/i386/mm/pageattr.c +++ b/arch/i386/mm/pageattr.c @@ -209,19 +209,19 @@ int change_page_attr(struct page *page, int numpages, pgprot_t prot) } void global_flush_tlb(void) -{ - LIST_HEAD(l); +{ + struct list_head l; struct page *pg, *next; BUG_ON(irqs_disabled()); spin_lock_irq(&cpa_lock); - list_splice_init(&df_list, &l); + list_replace_init(&df_list, &l); spin_unlock_irq(&cpa_lock); flush_map(); list_for_each_entry_safe(pg, next, &l, lru) __free_page(pg); -} +} #ifdef CONFIG_DEBUG_PAGEALLOC void kernel_map_pages(struct page *page, int numpages, int enable) |