aboutsummaryrefslogtreecommitdiffstats
path: root/mm/memory_hotplug.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2018-01-31 21:46:22 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2018-01-31 21:46:22 -0500
commit73da9e1a9f310a449eeb9bf5735a9cd475fef5e2 (patch)
tree82cd78255b0a480340a8427e7ba5586df8280ac4 /mm/memory_hotplug.c
parentb2fe5fa68642860e7de76167c3111623aa0d5de1 (diff)
parent3f56a2f8030071cf86520ef4fc3045ba6856e610 (diff)
Merge branch 'akpm' (patches from Andrew)
Merge updates from Andrew Morton: - misc fixes - ocfs2 updates - most of MM * emailed patches from Andrew Morton <akpm@linux-foundation.org>: (118 commits) mm: remove PG_highmem description tools, vm: new option to specify kpageflags file mm/swap.c: make functions and their kernel-doc agree mm, memory_hotplug: fix memmap initialization mm: correct comments regarding do_fault_around() mm: numa: do not trap faults on shared data section pages. hugetlb, mbind: fall back to default policy if vma is NULL hugetlb, mempolicy: fix the mbind hugetlb migration mm, hugetlb: further simplify hugetlb allocation API mm, hugetlb: get rid of surplus page accounting tricks mm, hugetlb: do not rely on overcommit limit during migration mm, hugetlb: integrate giga hugetlb more naturally to the allocation path mm, hugetlb: unify core page allocation accounting and initialization mm/memcontrol.c: try harder to decrease [memory,memsw].limit_in_bytes mm/memcontrol.c: make local symbol static mm/hmm: fix uninitialized use of 'entry' in hmm_vma_walk_pmd() include/linux/mmzone.h: fix explanation of lower bits in the SPARSEMEM mem_map pointer mm/compaction.c: fix comment for try_to_compact_pages() mm/page_ext.c: make page_ext_init a noop when CONFIG_PAGE_EXTENSION but nothing uses it zsmalloc: use U suffix for negative literals being shifted ...
Diffstat (limited to 'mm/memory_hotplug.c')
-rw-r--r--mm/memory_hotplug.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/mm/memory_hotplug.c b/mm/memory_hotplug.c
index c52aa05b106c..9bbd6982d4e4 100644
--- a/mm/memory_hotplug.c
+++ b/mm/memory_hotplug.c
@@ -184,7 +184,7 @@ static void register_page_bootmem_info_section(unsigned long start_pfn)
184 for (i = 0; i < mapsize; i++, page++) 184 for (i = 0; i < mapsize; i++, page++)
185 get_page_bootmem(section_nr, page, SECTION_INFO); 185 get_page_bootmem(section_nr, page, SECTION_INFO);
186 186
187 usemap = __nr_to_section(section_nr)->pageblock_flags; 187 usemap = ms->pageblock_flags;
188 page = virt_to_page(usemap); 188 page = virt_to_page(usemap);
189 189
190 mapsize = PAGE_ALIGN(usemap_size()) >> PAGE_SHIFT; 190 mapsize = PAGE_ALIGN(usemap_size()) >> PAGE_SHIFT;
@@ -200,9 +200,6 @@ static void register_page_bootmem_info_section(unsigned long start_pfn)
200 struct mem_section *ms; 200 struct mem_section *ms;
201 struct page *page, *memmap; 201 struct page *page, *memmap;
202 202
203 if (!pfn_valid(start_pfn))
204 return;
205
206 section_nr = pfn_to_section_nr(start_pfn); 203 section_nr = pfn_to_section_nr(start_pfn);
207 ms = __nr_to_section(section_nr); 204 ms = __nr_to_section(section_nr);
208 205
@@ -210,7 +207,7 @@ static void register_page_bootmem_info_section(unsigned long start_pfn)
210 207
211 register_page_bootmem_memmap(section_nr, memmap, PAGES_PER_SECTION); 208 register_page_bootmem_memmap(section_nr, memmap, PAGES_PER_SECTION);
212 209
213 usemap = __nr_to_section(section_nr)->pageblock_flags; 210 usemap = ms->pageblock_flags;
214 page = virt_to_page(usemap); 211 page = virt_to_page(usemap);
215 212
216 mapsize = PAGE_ALIGN(usemap_size()) >> PAGE_SHIFT; 213 mapsize = PAGE_ALIGN(usemap_size()) >> PAGE_SHIFT;
@@ -1637,7 +1634,7 @@ repeat:
1637 goto failed_removal; 1634 goto failed_removal;
1638 1635
1639 cond_resched(); 1636 cond_resched();
1640 lru_add_drain_all_cpuslocked(); 1637 lru_add_drain_all();
1641 drain_all_pages(zone); 1638 drain_all_pages(zone);
1642 1639
1643 pfn = scan_movable_pages(start_pfn, end_pfn); 1640 pfn = scan_movable_pages(start_pfn, end_pfn);