aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/mm.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/mm.h')
-rw-r--r--include/linux/mm.h7
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)
465struct zone; 465struct zone;
466extern struct zone *zone_table[]; 466extern struct zone *zone_table[];
467 467
468static inline int page_zone_id(struct page *page)
469{
470 return (page->flags >> ZONETABLE_PGSHIFT) & ZONETABLE_MASK;
471}
468static inline struct zone *page_zone(struct page *page) 472static 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
474static inline unsigned long page_to_nid(struct page *page) 477static inline unsigned long page_to_nid(struct page *page)