aboutsummaryrefslogtreecommitdiffstats
path: root/mm/page_alloc.c
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2015-07-23 03:41:16 -0400
committerDavid S. Miller <davem@davemloft.net>2015-07-23 03:41:16 -0400
commitc5e40ee287db61a79af1746954ee03ebbf1ff8a3 (patch)
tree007da00e75e9b84766ac4868421705300e1e2e14 /mm/page_alloc.c
parent052831879945be0d9fad2216b127147c565ec1b1 (diff)
parentc5dfd654d0ec0a28fe81e7bd4d4fd984a9855e09 (diff)
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Conflicts: net/bridge/br_mdb.c br_mdb.c conflict was a function call being removed to fix a bug in 'net' but whose signature was changed in 'net-next'. Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'mm/page_alloc.c')
-rw-r--r--mm/page_alloc.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/mm/page_alloc.c b/mm/page_alloc.c
index 506eac8b38af..ef19f22b2b7d 100644
--- a/mm/page_alloc.c
+++ b/mm/page_alloc.c
@@ -246,9 +246,7 @@ static inline void reset_deferred_meminit(pg_data_t *pgdat)
246/* Returns true if the struct page for the pfn is uninitialised */ 246/* Returns true if the struct page for the pfn is uninitialised */
247static inline bool __meminit early_page_uninitialised(unsigned long pfn) 247static inline bool __meminit early_page_uninitialised(unsigned long pfn)
248{ 248{
249 int nid = early_pfn_to_nid(pfn); 249 if (pfn >= NODE_DATA(early_pfn_to_nid(pfn))->first_deferred_pfn)
250
251 if (pfn >= NODE_DATA(nid)->first_deferred_pfn)
252 return true; 250 return true;
253 251
254 return false; 252 return false;
@@ -1950,6 +1948,7 @@ void free_hot_cold_page_list(struct list_head *list, bool cold)
1950void split_page(struct page *page, unsigned int order) 1948void split_page(struct page *page, unsigned int order)
1951{ 1949{
1952 int i; 1950 int i;
1951 gfp_t gfp_mask;
1953 1952
1954 VM_BUG_ON_PAGE(PageCompound(page), page); 1953 VM_BUG_ON_PAGE(PageCompound(page), page);
1955 VM_BUG_ON_PAGE(!page_count(page), page); 1954 VM_BUG_ON_PAGE(!page_count(page), page);
@@ -1963,10 +1962,11 @@ void split_page(struct page *page, unsigned int order)
1963 split_page(virt_to_page(page[0].shadow), order); 1962 split_page(virt_to_page(page[0].shadow), order);
1964#endif 1963#endif
1965 1964
1966 set_page_owner(page, 0, 0); 1965 gfp_mask = get_page_owner_gfp(page);
1966 set_page_owner(page, 0, gfp_mask);
1967 for (i = 1; i < (1 << order); i++) { 1967 for (i = 1; i < (1 << order); i++) {
1968 set_page_refcounted(page + i); 1968 set_page_refcounted(page + i);
1969 set_page_owner(page + i, 0, 0); 1969 set_page_owner(page + i, 0, gfp_mask);
1970 } 1970 }
1971} 1971}
1972EXPORT_SYMBOL_GPL(split_page); 1972EXPORT_SYMBOL_GPL(split_page);
@@ -1996,6 +1996,8 @@ int __isolate_free_page(struct page *page, unsigned int order)
1996 zone->free_area[order].nr_free--; 1996 zone->free_area[order].nr_free--;
1997 rmv_page_order(page); 1997 rmv_page_order(page);
1998 1998
1999 set_page_owner(page, order, __GFP_MOVABLE);
2000
1999 /* Set the pageblock if the isolated page is at least a pageblock */ 2001 /* Set the pageblock if the isolated page is at least a pageblock */
2000 if (order >= pageblock_order - 1) { 2002 if (order >= pageblock_order - 1) {
2001 struct page *endpage = page + (1 << order) - 1; 2003 struct page *endpage = page + (1 << order) - 1;
@@ -2007,7 +2009,7 @@ int __isolate_free_page(struct page *page, unsigned int order)
2007 } 2009 }
2008 } 2010 }
2009 2011
2010 set_page_owner(page, order, 0); 2012
2011 return 1UL << order; 2013 return 1UL << order;
2012} 2014}
2013 2015