Commit b1995c18 authored by Domen Puncer's avatar Domen Puncer Committed by Linus Torvalds

[PATCH] list_for_each_entry: arch-i386-mm-pageattr.c

Make code more readable with list_for_each_entry*
Signed-off-by: default avatarDomen Puncer <domen@coderock.org>
Signed-off-by: default avatarMaximilian Attems <janitor@sternwelten.at>
Signed-off-by: default avatarDomen Puncer <domen@coderock.org>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 7b819b55
......@@ -189,7 +189,7 @@ int change_page_attr(struct page *page, int numpages, pgprot_t prot)
void global_flush_tlb(void)
{
LIST_HEAD(l);
struct list_head* n;
struct page *pg, *next;
BUG_ON(irqs_disabled());
......@@ -197,12 +197,8 @@ void global_flush_tlb(void)
list_splice_init(&df_list, &l);
spin_unlock_irq(&cpa_lock);
flush_map();
n = l.next;
while (n != &l) {
struct page *pg = list_entry(n, struct page, lru);
n = n->next;
list_for_each_entry_safe(pg, next, &l, lru)
__free_page(pg);
}
}
#ifdef CONFIG_DEBUG_PAGEALLOC
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment