Commit ec2ecf30 authored by Andrew Morton's avatar Andrew Morton Committed by Linus Torvalds

[PATCH] small cleanup for __rmqueue

From: Zwane Mwaikambo <zwane@linuxpower.ca>

Removes an extra initialisation and general nitpicking.
parent 9dd3c71c
...@@ -336,21 +336,17 @@ static void prep_new_page(struct page *page, int order) ...@@ -336,21 +336,17 @@ static void prep_new_page(struct page *page, int order)
static struct page *__rmqueue(struct zone *zone, unsigned int order) static struct page *__rmqueue(struct zone *zone, unsigned int order)
{ {
struct free_area * area; struct free_area * area;
unsigned int current_order = order; unsigned int current_order;
struct list_head *head, *curr;
struct page *page; struct page *page;
unsigned int index; unsigned int index;
for (current_order=order; current_order < MAX_ORDER; ++current_order) { for (current_order = order; current_order < MAX_ORDER; ++current_order) {
area = zone->free_area + current_order; area = zone->free_area + current_order;
head = &area->free_list;
curr = head->next;
if (list_empty(&area->free_list)) if (list_empty(&area->free_list))
continue; continue;
page = list_entry(curr, struct page, list); page = list_entry(area->free_list.next, struct page, list);
list_del(curr); list_del(&page->list);
index = page - zone->zone_mem_map; index = page - zone->zone_mem_map;
if (current_order != MAX_ORDER-1) if (current_order != MAX_ORDER-1)
MARK_USED(index, current_order, area); MARK_USED(index, current_order, area);
......
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