--- include/linux/mm.h | 6 +++++- mm/page_alloc.c | 5 ++--- 2 files changed, 7 insertions(+), 4 deletions(-) Index: linux-2.6/include/linux/mm.h =================================================================== --- linux-2.6.orig/include/linux/mm.h 2007-11-14 18:25:13.000000000 -0800 +++ linux-2.6/include/linux/mm.h 2007-11-14 18:26:09.000000000 -0800 @@ -295,7 +295,11 @@ static inline int compound_order(struct static inline void set_compound_order(struct page *page, unsigned long order) { - page[1].lru.prev = (void *)order; + if (order) { + SetPageHead(page); + page[1].lru.prev = (void *)order; + } else + ClearPageHead(page); } /* Index: linux-2.6/mm/page_alloc.c =================================================================== --- linux-2.6.orig/mm/page_alloc.c 2007-11-14 18:24:01.000000000 -0800 +++ linux-2.6/mm/page_alloc.c 2007-11-14 18:42:02.000000000 -0800 @@ -317,14 +317,13 @@ static inline void prep_zero_page(struct static inline void set_page_order(struct page *page, int order) { - set_page_private(page, order); + set_compound_order(page, order); __SetPageBuddy(page); } static inline void rmv_page_order(struct page *page) { __ClearPageBuddy(page); - set_page_private(page, 0); } /* @@ -718,7 +717,7 @@ int move_freepages(struct zone *zone, continue; } - order = page_order(page); + order = compound_order(page); list_del(&page->lru); list_add(&page->lru, &zone->free_area[order].free_list[migratetype]);