Skip to content

Commit

Permalink
mm/page_isolation.c: remove redundant pfn_valid_within() in __first_v…
Browse files Browse the repository at this point in the history
…alid_page()

pfn_valid_within() calls pfn_valid() when CONFIG_HOLES_IN_ZONE making it
redundant for both definitions (w/wo CONFIG_MEMORY_HOTPLUG) of the helper
pfn_to_online_page() which either calls pfn_valid() or pfn_valid_within().
pfn_valid_within() being 1 when !CONFIG_HOLES_IN_ZONE is irrelevant
either way.  This does not change functionality.

Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Anshuman Khandual <[email protected]>
Reviewed-by: Zi Yan <[email protected]>
Reviewed-by: Oscar Salvador <[email protected]>
Acked-by: Michal Hocko <[email protected]>
Cc: Mike Kravetz <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
  • Loading branch information
Anshuman Khandual authored and torvalds committed May 14, 2019
1 parent b6cfab7 commit 5e65af1
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions mm/page_isolation.c
Original file line number Diff line number Diff line change
Expand Up @@ -151,8 +151,6 @@ __first_valid_page(unsigned long pfn, unsigned long nr_pages)
for (i = 0; i < nr_pages; i++) {
struct page *page;

if (!pfn_valid_within(pfn + i))
continue;
page = pfn_to_online_page(pfn + i);
if (!page)
continue;
Expand Down

0 comments on commit 5e65af1

Please sign in to comment.