Skip to content

Commit

Permalink
mm/memory_hotplug: we always have a zone in find_(smallest|biggest)_s…
Browse files Browse the repository at this point in the history
…ection_pfn

With shrink_pgdat_span() out of the way, we now always have a valid zone.

Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: David Hildenbrand <[email protected]>
Cc: Michal Hocko <[email protected]>
Cc: "Matthew Wilcox (Oracle)" <[email protected]>
Cc: "Aneesh Kumar K.V" <[email protected]>
Cc: Pavel Tatashin <[email protected]>
Cc: Greg Kroah-Hartman <[email protected]>
Cc: Dan Williams <[email protected]>
Cc: Logan Gunthorpe <[email protected]>
Cc: Oscar Salvador <[email protected]>
Cc: Pankaj Gupta <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
  • Loading branch information
davidhildenbrand authored and torvalds committed Feb 4, 2020
1 parent d33695b commit 9b05158
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions mm/memory_hotplug.c
Original file line number Diff line number Diff line change
Expand Up @@ -355,7 +355,7 @@ static unsigned long find_smallest_section_pfn(int nid, struct zone *zone,
if (unlikely(pfn_to_nid(start_pfn) != nid))
continue;

if (zone && zone != page_zone(pfn_to_page(start_pfn)))
if (zone != page_zone(pfn_to_page(start_pfn)))
continue;

return start_pfn;
Expand All @@ -380,7 +380,7 @@ static unsigned long find_biggest_section_pfn(int nid, struct zone *zone,
if (unlikely(pfn_to_nid(pfn) != nid))
continue;

if (zone && zone != page_zone(pfn_to_page(pfn)))
if (zone != page_zone(pfn_to_page(pfn)))
continue;

return pfn;
Expand Down

0 comments on commit 9b05158

Please sign in to comment.