From a00da9d9f0b9e149c4dd5ee91d1b7b988d8758a1 Mon Sep 17 00:00:00 2001 From: Christoph Lameter Date: Wed, 26 Sep 2007 11:09:58 -0700 Subject: [PATCH] compound_pagevcompound_independent --- include/linux/page-flags.h | 21 ++++----------------- 1 file changed, 4 insertions(+), 17 deletions(-) Index: linux-2.6/include/linux/page-flags.h =================================================================== --- linux-2.6.orig/include/linux/page-flags.h 2008-02-16 20:35:06.000000000 -0800 +++ linux-2.6/include/linux/page-flags.h 2008-02-16 20:35:07.000000000 -0800 @@ -88,6 +88,7 @@ #define PG_mappedtodisk 16 /* Has blocks allocated on-disk */ #define PG_reclaim 17 /* To be reclaimed asap */ #define PG_buddy 19 /* Page is free, on buddy lists */ +#define PG_vcompound 20 /* Page is a virtual compound */ #define PG_head 21 /* Page is head of a compound page */ #define PG_tail 22 /* Page is tail of a compound page */ @@ -265,23 +266,9 @@ static inline void SetPageUptodate(struc #define PageCompound(page) ((page)->flags & \ ((1L << PG_head) | (1L << PG_tail))) -/* - * PG_swapcache is used in combination with PG_compound to indicate - * that a compound page was allocated via vmalloc. - */ -#define PG_vcompound_mask ((1L << PG_compound) | (1L << PG_swapcache)) -#define PageVcompound(page) ((page->flags & PG_vcompound_mask) \ - == PG_vcompound_mask) - -static inline void __SetPageVcompound(struct page *page) -{ - page->flags |= PG_vcompound_mask; -} - -static inline void __ClearPageVcompound(struct page *page) -{ - page->flags &= ~PG_vcompound_mask; -} +#define PageVcompound(page) test_bit(PG_vcompound, &(page->flags)) +#define __SetPageVcompound(page) __set_bit(PG_vcompound, &(page)->flags) +#define __ClearPageVcompound(page) __clear_bit(PG_vcompound, &(page)->flags) #ifdef CONFIG_SWAP #define PageSwapCache(page) test_bit(PG_swapcache, &(page)->flags)