--- mm/page_alloc.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) Index: linux-2.6/mm/page_alloc.c =================================================================== --- linux-2.6.orig/mm/page_alloc.c 2007-09-25 00:15:36.000000000 -0700 +++ linux-2.6/mm/page_alloc.c 2007-09-25 00:16:01.000000000 -0700 @@ -268,9 +268,6 @@ static void destroy_compound_page(struct if (unlikely(compound_order(page) != order)) bad_page(page); - if (unlikely(!PageHead(page))) - bad_page(page); - __ClearPageHead(page); for (i = 1; i < nr_pages; i++) { struct page *p = compound_nth_page(page, i); @@ -279,6 +276,9 @@ static void destroy_compound_page(struct bad_page(page); __ClearPageTail(p); } + if (unlikely(!PageHead(page))) + bad_page(page); + __ClearPageHead(page); } static inline void prep_zero_page(struct page *page, int order, gfp_t gfp_flags)