Index: linux-2.6/include/linux/mm.h =================================================================== --- linux-2.6.orig/include/linux/mm.h 2007-09-16 20:07:33.000000000 -0700 +++ linux-2.6/include/linux/mm.h 2007-09-16 20:09:40.000000000 -0700 @@ -343,11 +343,13 @@ typedef void compound_page_dtor(struct p static inline void set_compound_page_dtor(struct page *page, compound_page_dtor *dtor) { + BUG_ON(PageVmalloc(page)); page[1].lru.next = (void *)dtor; } static inline compound_page_dtor *get_compound_page_dtor(struct page *page) { + BUG_ON(PageVMalloc(page)); return (compound_page_dtor *)page[1].lru.next; } @@ -355,11 +357,13 @@ static inline int compound_order(struct { if (!PageHead(page)) return 0; + BUG_ON(PageVmalloc(page)); return (unsigned long)page[1].lru.prev; } static inline void set_compound_order(struct page *page, unsigned long order) { + BUG_ON(PageVmalloc(page)); page[1].lru.prev = (void *)order; }