aboutsummaryrefslogtreecommitdiffstats
path: root/mm/page_alloc.c
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 /mm/page_alloc.c
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 'mm/page_alloc.c')
-rw-r--r--mm/page_alloc.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/mm/page_alloc.c b/mm/page_alloc.c
index 3ede25e6686e..445718b328b6 100644
--- a/mm/page_alloc.c
+++ b/mm/page_alloc.c
@@ -295,7 +295,7 @@ static void bad_page(struct page *page)
295 295
296 /* Don't complain about poisoned pages */ 296 /* Don't complain about poisoned pages */
297 if (PageHWPoison(page)) { 297 if (PageHWPoison(page)) {
298 reset_page_mapcount(page); /* remove PageBuddy */ 298 page_mapcount_reset(page); /* remove PageBuddy */
299 return; 299 return;
300 } 300 }
301 301
@@ -327,7 +327,7 @@ static void bad_page(struct page *page)
327 dump_stack(); 327 dump_stack();
328out: 328out:
329 /* Leave bad fields for debug, except PageBuddy could make trouble */ 329 /* Leave bad fields for debug, except PageBuddy could make trouble */
330 reset_page_mapcount(page); /* remove PageBuddy */ 330 page_mapcount_reset(page); /* remove PageBuddy */
331 add_taint(TAINT_BAD_PAGE); 331 add_taint(TAINT_BAD_PAGE);
332} 332}
333 333
@@ -613,7 +613,7 @@ static inline int free_pages_check(struct page *page)
613 bad_page(page); 613 bad_page(page);
614 return 1; 614 return 1;
615 } 615 }
616 reset_page_last_nid(page); 616 page_nid_reset_last(page);
617 if (page->flags & PAGE_FLAGS_CHECK_AT_PREP) 617 if (page->flags & PAGE_FLAGS_CHECK_AT_PREP)
618 page->flags &= ~PAGE_FLAGS_CHECK_AT_PREP; 618 page->flags &= ~PAGE_FLAGS_CHECK_AT_PREP;
619 return 0; 619 return 0;
@@ -3894,8 +3894,8 @@ void __meminit memmap_init_zone(unsigned long size, int nid, unsigned long zone,
3894 set_page_links(page, zone, nid, pfn); 3894 set_page_links(page, zone, nid, pfn);
3895 mminit_verify_page_links(page, zone, nid, pfn); 3895 mminit_verify_page_links(page, zone, nid, pfn);
3896 init_page_count(page); 3896 init_page_count(page);
3897 reset_page_mapcount(page); 3897 page_mapcount_reset(page);
3898 reset_page_last_nid(page); 3898 page_nid_reset_last(page);
3899 SetPageReserved(page); 3899 SetPageReserved(page);
3900 /* 3900 /*
3901 * Mark the block movable so that blocks are reserved for 3901 * Mark the block movable so that blocks are reserved for