/* Go through the free lists for the given migratetype and remove the smallest available page from the freelists  */
static struct page* __rmqueue_smallest(struct zone *zone, unsigned int order, int migratetype)
/* Go through the free lists for the given migratetype and remove the smallest available page from the freelists  */
static struct page* __rmqueue_smallest(struct zone *zone, unsigned int order, int migratetype)
{
	unsigned int current_order;
	struct free_area * area;
	struct page *page;
	for (current_order = order; current_order < MAX_ORDER; ++current_order) {
		area = &(zone->free_area[current_order]);
		if (list_empty(&area->free_list[migratetype]))
			continue;
		page = list_entry(area->free_list[migratetype].next,
							struct page, lru);
		list_del(&page->lru);
		rmv_page_order(page);
		area->nr_free--;
		expand(zone, page, order, current_order, area, migratetype);
		return page;
	}
	return NULL;
}