aboutsummaryrefslogtreecommitdiffstats
path: root/arch/i386/mm/pageattr.c
diff options
context:
space:
mode:
authorOleg Nesterov <oleg@tv-sign.ru>2006-06-23 05:05:55 -0400
committerLinus Torvalds <torvalds@g5.osdl.org>2006-06-23 10:43:07 -0400
commit626ab0e69d376fa07599af669af8ba92d58e87c1 (patch)
treea995e0231e61fab63568bc7bade81dc20c1dae09 /arch/i386/mm/pageattr.c
parent54e73770357142e297c916c7865f5fca7499f69c (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 'arch/i386/mm/pageattr.c')
-rw-r--r--arch/i386/mm/pageattr.c8
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)
209} 209}
210 210
211void global_flush_tlb(void) 211void global_flush_tlb(void)
212{ 212{
213 LIST_HEAD(l); 213 struct list_head l;
214 struct page *pg, *next; 214 struct page *pg, *next;
215 215
216 BUG_ON(irqs_disabled()); 216 BUG_ON(irqs_disabled());
217 217
218 spin_lock_irq(&cpa_lock); 218 spin_lock_irq(&cpa_lock);
219 list_splice_init(&df_list, &l); 219 list_replace_init(&df_list, &l);
220 spin_unlock_irq(&cpa_lock); 220 spin_unlock_irq(&cpa_lock);
221 flush_map(); 221 flush_map();
222 list_for_each_entry_safe(pg, next, &l, lru) 222 list_for_each_entry_safe(pg, next, &l, lru)
223 __free_page(pg); 223 __free_page(pg);
224} 224}
225 225
226#ifdef CONFIG_DEBUG_PAGEALLOC 226#ifdef CONFIG_DEBUG_PAGEALLOC
227void kernel_map_pages(struct page *page, int numpages, int enable) 227void kernel_map_pages(struct page *page, int numpages, int enable)