aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/mm.h
diff options
context:
space:
mode:
authorMel Gorman <mgorman@suse.de>2013-02-22 19:34:59 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2013-02-23 20:50:18 -0500
commit22b751c3d0376e86a377e3a0aa2ddbbe9d2eefc1 (patch)
treefe946d7d4350b2454d65f88377d264fbc93958ce /include/linux/mm.h
parente4715f01be697a3730c78f8ffffb595591d6a88c (diff)
mm: rename page struct field helpers
The function names page_xchg_last_nid(), page_last_nid() and reset_page_last_nid() were judged to be inconsistent so rename them to a struct_field_op style pattern. As it looked jarring to have reset_page_mapcount() and page_nid_reset_last() beside each other in memmap_init_zone(), this patch also renames reset_page_mapcount() to page_mapcount_reset(). There are others like init_page_count() but as it is used throughout the arch code a rename would likely cause more conflicts than it is worth. [akpm@linux-foundation.org: fix zcache] Signed-off-by: Mel Gorman <mgorman@suse.de> Suggested-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'include/linux/mm.h')
-rw-r--r--include/linux/mm.h20
1 files changed, 10 insertions, 10 deletions
diff --git a/include/linux/mm.h b/include/linux/mm.h
index 8a5bbe3b9e56..fe039bdba4ed 100644
--- a/include/linux/mm.h
+++ b/include/linux/mm.h
@@ -367,7 +367,7 @@ static inline struct page *compound_head(struct page *page)
367 * both from it and to it can be tracked, using atomic_inc_and_test 367 * both from it and to it can be tracked, using atomic_inc_and_test
368 * and atomic_add_negative(-1). 368 * and atomic_add_negative(-1).
369 */ 369 */
370static inline void reset_page_mapcount(struct page *page) 370static inline void page_mapcount_reset(struct page *page)
371{ 371{
372 atomic_set(&(page)->_mapcount, -1); 372 atomic_set(&(page)->_mapcount, -1);
373} 373}
@@ -658,28 +658,28 @@ static inline int page_to_nid(const struct page *page)
658 658
659#ifdef CONFIG_NUMA_BALANCING 659#ifdef CONFIG_NUMA_BALANCING
660#ifdef LAST_NID_NOT_IN_PAGE_FLAGS 660#ifdef LAST_NID_NOT_IN_PAGE_FLAGS
661static inline int page_xchg_last_nid(struct page *page, int nid) 661static inline int page_nid_xchg_last(struct page *page, int nid)
662{ 662{
663 return xchg(&page->_last_nid, nid); 663 return xchg(&page->_last_nid, nid);
664} 664}
665 665
666static inline int page_last_nid(struct page *page) 666static inline int page_nid_last(struct page *page)
667{ 667{
668 return page->_last_nid; 668 return page->_last_nid;
669} 669}
670static inline void reset_page_last_nid(struct page *page) 670static inline void page_nid_reset_last(struct page *page)
671{ 671{
672 page->_last_nid = -1; 672 page->_last_nid = -1;
673} 673}
674#else 674#else
675static inline int page_last_nid(struct page *page) 675static inline int page_nid_last(struct page *page)
676{ 676{
677 return (page->flags >> LAST_NID_PGSHIFT) & LAST_NID_MASK; 677 return (page->flags >> LAST_NID_PGSHIFT) & LAST_NID_MASK;
678} 678}
679 679
680extern int page_xchg_last_nid(struct page *page, int nid); 680extern int page_nid_xchg_last(struct page *page, int nid);
681 681
682static inline void reset_page_last_nid(struct page *page) 682static inline void page_nid_reset_last(struct page *page)
683{ 683{
684 int nid = (1 << LAST_NID_SHIFT) - 1; 684 int nid = (1 << LAST_NID_SHIFT) - 1;
685 685
@@ -688,17 +688,17 @@ static inline void reset_page_last_nid(struct page *page)
688} 688}
689#endif /* LAST_NID_NOT_IN_PAGE_FLAGS */ 689#endif /* LAST_NID_NOT_IN_PAGE_FLAGS */
690#else 690#else
691static inline int page_xchg_last_nid(struct page *page, int nid) 691static inline int page_nid_xchg_last(struct page *page, int nid)
692{ 692{
693 return page_to_nid(page); 693 return page_to_nid(page);
694} 694}
695 695
696static inline int page_last_nid(struct page *page) 696static inline int page_nid_last(struct page *page)
697{ 697{
698 return page_to_nid(page); 698 return page_to_nid(page);
699} 699}
700 700
701static inline void reset_page_last_nid(struct page *page) 701static inline void page_nid_reset_last(struct page *page)
702{ 702{
703} 703}
704#endif 704#endif