diff options
Diffstat (limited to 'include/linux/mm.h')
-rw-r--r-- | include/linux/mm.h | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/include/linux/mm.h b/include/linux/mm.h index e2fa375e478e..697c6bf248c2 100644 --- a/include/linux/mm.h +++ b/include/linux/mm.h | |||
@@ -465,10 +465,13 @@ static inline unsigned long page_zonenum(struct page *page) | |||
465 | struct zone; | 465 | struct zone; |
466 | extern struct zone *zone_table[]; | 466 | extern struct zone *zone_table[]; |
467 | 467 | ||
468 | static inline int page_zone_id(struct page *page) | ||
469 | { | ||
470 | return (page->flags >> ZONETABLE_PGSHIFT) & ZONETABLE_MASK; | ||
471 | } | ||
468 | static inline struct zone *page_zone(struct page *page) | 472 | static inline struct zone *page_zone(struct page *page) |
469 | { | 473 | { |
470 | return zone_table[(page->flags >> ZONETABLE_PGSHIFT) & | 474 | return zone_table[page_zone_id(page)]; |
471 | ZONETABLE_MASK]; | ||
472 | } | 475 | } |
473 | 476 | ||
474 | static inline unsigned long page_to_nid(struct page *page) | 477 | static inline unsigned long page_to_nid(struct page *page) |