--- include/linux/page-flags.h | 53 +++++++++++++++++++++++---------------------- 1 file changed, 28 insertions(+), 25 deletions(-) Index: linux-2.6.25-rc8-mm2/include/linux/page-flags.h =================================================================== --- linux-2.6.25-rc8-mm2.orig/include/linux/page-flags.h 2008-04-17 22:16:45.359889880 -0700 +++ linux-2.6.25-rc8-mm2/include/linux/page-flags.h 2008-04-17 22:17:12.553638963 -0700 @@ -69,34 +69,37 @@ * SPARSEMEM section (for variants of SPARSEMEM that require section ids like * SPARSEMEM_EXTREME with !SPARSEMEM_VMEMMAP). */ -enum pageflags { - PG_locked, /* Page is locked. Don't touch. */ - PG_error, - PG_referenced, - PG_uptodate, - PG_dirty, - PG_lru, - PG_active, - PG_slab, - PG_owner_priv_1, /* Owner use. If pagecache, fs may use*/ - PG_arch_1, - PG_reserved, - PG_private, /* If pagecache, has fs-private data */ - PG_writeback, /* Page is under writeback */ +struct pageflags { + unsigned PG_locked:1, /* Page is locked. Don't touch. */ + unsigned PG_error:1, + unsigned PG_referenced:1, + PG_uptodate:1, + PG_dirty:1, + PG_lru:1, + PG_active:1, + PG_slab:1, + PG_owner_priv_1:1, /* Owner use. If pagecache, fs may use*/ + PG_arch_1:1, + PG_reserved:1, + PG_private:1, /* If pagecache, has fs-private data */ + PG_writeback:1, /* Page is under writeback */ #ifdef CONFIG_PAGEFLAGS_EXTENDED - PG_head, /* A head page */ - PG_tail, /* A tail page */ + PG_head:1, /* A head page */ + PG_tail:1, /* A tail page */ #else - PG_compound, /* A compound page */ + PG_compound:1, /* A compound page */ #endif - PG_swapcache, /* Swap page: swp_entry_t in private */ - PG_mappedtodisk, /* Has blocks allocated on-disk */ - PG_reclaim, /* To be reclaimed asap */ - PG_buddy, /* Page is free, on buddy lists */ + PG_swapcache:1, /* Swap page: swp_entry_t in private */ + PG_mappedtodisk:1, /* Has blocks allocated on-disk */ + PG_reclaim:1, /* To be reclaimed asap */ + PG_buddy:1, /* Page is free, on buddy lists */ #ifdef CONFIG_IA64_UNCACHED_ALLOCATOR - PG_uncached, /* Page has been mapped as uncached */ + PG_uncached:1, /* Page has been mapped as uncached */ #endif - __NR_PAGEFLAGS + filler: BITS_PER_LONG - ZONES_WIDTH - NODES_WIDTH - SECTIONS_WIDTH; + zonenum: ZONES_WIDTH; + node: NODES_WIDTH; + section: SECTIONS_WIDTH; }; #ifndef __GENERATING_BOUNDS_H @@ -106,11 +109,11 @@ enum pageflags { */ #define TESTPAGEFLAG(uname, lname) \ static inline int Page##uname(struct page *page) \ - { return test_bit(PG_##lname, &page->flags); } + { return page->flags.PG_##lname; } #define SETPAGEFLAG(uname, lname) \ static inline void SetPage##uname(struct page *page) \ - { set_bit(PG_##lname, &page->flags); } + { page->flags.PG_##lname = 1; } #define CLEARPAGEFLAG(uname, lname) \ static inline void ClearPage##uname(struct page *page) \