All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] mm/isolation: Remove redundant pfn_valid_within() in __first_valid_page()
@ 2019-03-21  4:13 Anshuman Khandual
  2019-03-21  5:01 ` Zi Yan
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: Anshuman Khandual @ 2019-03-21  4:13 UTC (permalink / raw)
  To: linux-mm, linux-kernel; +Cc: mike.kravetz, zi.yan, osalvador, mhocko, akpm

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.

Fixes: 2ce13640b3f4 ("mm: __first_valid_page skip over offline pages")
Signed-off-by: Anshuman Khandual <anshuman.khandual@arm.com>
---
 mm/page_isolation.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/mm/page_isolation.c b/mm/page_isolation.c
index ce323e56b34d..d9b02bb13d60 100644
--- a/mm/page_isolation.c
+++ b/mm/page_isolation.c
@@ -150,8 +150,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;
-- 
2.20.1


^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2019-03-22  9:23 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-03-21  4:13 [PATCH] mm/isolation: Remove redundant pfn_valid_within() in __first_valid_page() Anshuman Khandual
2019-03-21  5:01 ` Zi Yan
2019-03-21  5:33   ` Anshuman Khandual
2019-03-21  8:07     ` Michal Hocko
2019-03-21  8:13       ` Anshuman Khandual
2019-03-21  9:42 ` Oscar Salvador
2019-03-21 10:03   ` Michal Hocko
2019-03-22  9:23 ` Michal Hocko

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.