--- include/linux/page-flags.h | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) Index: linux-2.6/include/linux/page-flags.h =================================================================== --- linux-2.6.orig/include/linux/page-flags.h 2008-02-17 21:31:56.000000000 -0800 +++ linux-2.6/include/linux/page-flags.h 2008-02-17 21:32:51.000000000 -0800 @@ -81,7 +81,7 @@ enum pageflags { PG_reserved, PG_private, /* If pagecache, has fs-private data */ PG_writeback, /* Page is under writeback */ - PG_compound, /* A compound page */ + PG_head, /* Head of a compound page */ PG_swapcache, /* Swap page: swp_entry_t in private */ PG_mappedtodisk, /* Has blocks allocated on-disk */ PG_reclaim, /* To be reclaimed asap */ @@ -239,8 +239,10 @@ static inline void set_page_writeback(st test_set_page_writeback(page); } -TESTPAGEFLAG(Compound, compound) -__PAGEFLAG(Head, compound) +#define PG_compound PG_head + +__PAGEFLAG(Compound, head) +__PAGEFLAG(Head, head) /* * PG_reclaim is used in combination with PG_compound to mark the @@ -267,4 +269,11 @@ static inline void __ClearPageTail(struc page->flags &= ~PG_head_tail_mask; } +/* + * Compound pages cannot be used for the page cache if we do not + * have enough flags. So we can use the dirty flag for virtually + * mapped compound pages. + */ +__PAGEFLAG(Vcompound, dirty) + #endif /* PAGE_FLAGS_H */