diff options
author | Dmitry Shmidt <dimitrysh@google.com> | 2016-08-11 15:12:05 -0700 |
---|---|---|
committer | Dmitry Shmidt <dimitrysh@google.com> | 2016-08-11 15:12:05 -0700 |
commit | 1f369b24e2987c1b29c88ffcbd0ca99cddabe01c (patch) | |
tree | 9890a7ff909f71bc4f252f227ecb2532ace2d7fe /mm/page_alloc.c | |
parent | b558f17a13b10761eb6f838e713425b9e83f8a01 (diff) | |
parent | 133cec911c639d2cdf544ed602442951f702e08c (diff) |
Merge tag 'v4.4.17' into android-4.4.y
This is the 4.4.17 stable release
Diffstat (limited to 'mm/page_alloc.c')
-rw-r--r-- | mm/page_alloc.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/mm/page_alloc.c b/mm/page_alloc.c index 8bbefa93eb77..1874f2902237 100644 --- a/mm/page_alloc.c +++ b/mm/page_alloc.c @@ -287,7 +287,9 @@ static inline void reset_deferred_meminit(pg_data_t *pgdat) /* Returns true if the struct page for the pfn is uninitialised */ static inline bool __meminit early_page_uninitialised(unsigned long pfn) { - if (pfn >= NODE_DATA(early_pfn_to_nid(pfn))->first_deferred_pfn) + int nid = early_pfn_to_nid(pfn); + + if (node_online(nid) && pfn >= NODE_DATA(nid)->first_deferred_pfn) return true; return false; @@ -1069,7 +1071,7 @@ int __meminit early_pfn_to_nid(unsigned long pfn) spin_lock(&early_pfn_lock); nid = __early_pfn_to_nid(pfn, &early_pfnnid_cache); if (nid < 0) - nid = 0; + nid = first_online_node; spin_unlock(&early_pfn_lock); return nid; |