mm/page_alloc: drop the unnecessary pfn_valid() for start pfn
authorBaolin Wang <baolin.wang@linux.alibaba.com>
Mon, 24 Apr 2023 13:45:39 +0000 (21:45 +0800)
committerAndrew Morton <akpm@linux-foundation.org>
Fri, 9 Jun 2023 23:25:14 +0000 (16:25 -0700)
commit3c4322c94b9af33dc62e47cb80c057f9814fb595
treec4dbf4b99f6c172380eae4b968cd614e351fdc82
parent8b9167cd9ef039d95b65ef9600a7507795173121
mm/page_alloc: drop the unnecessary pfn_valid() for start pfn

__pageblock_pfn_to_page() currently performs both pfn_valid check and
pfn_to_online_page().  The former one is redundant because the latter is a
stronger check.  Drop pfn_valid().

Link: https://lkml.kernel.org/r/c3868b58c6714c09a43440d7d02c7b4eed6e03f6.1682342634.git.baolin.wang@linux.alibaba.com
Signed-off-by: Baolin Wang <baolin.wang@linux.alibaba.com>
Reviewed-by: David Hildenbrand <david@redhat.com>
Reviewed-by: "Huang, Ying" <ying.huang@intel.com>
Acked-by: Michal Hocko <mhocko@suse.com>
Cc: Mel Gorman <mgorman@techsingularity.net>
Cc: Mike Rapoport (IBM) <rppt@kernel.org>
Cc: Vlastimil Babka <vbabka@suse.cz>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
mm/page_alloc.c