diff options
author | Anshuman Khandual <[email protected]> | 2019-05-13 17:17:50 -0700 |
---|---|---|
committer | Linus Torvalds <[email protected]> | 2019-05-14 09:47:46 -0700 |
commit | 5e65af19e89ac33dc83e1869c78b33ed7099469b (patch) | |
tree | a26a26b6ed0206a842d1ebafdcdde39e6614b57b | |
parent | b6cfab7ad19d4920d5765e53042cfa62f2fced3d (diff) |
mm/page_isolation.c: remove redundant pfn_valid_within() in __first_valid_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]>
-rw-r--r-- | mm/page_isolation.c | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/mm/page_isolation.c b/mm/page_isolation.c index 019280712e1b..e3638a5bafff 100644 --- a/mm/page_isolation.c +++ b/mm/page_isolation.c @@ -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; |