Commit 97144ce0 authored by Vern Hao's avatar Vern Hao Committed by Andrew Morton

mm/vmscan: use folio_migratetype() instead of get_pageblock_migratetype()

In skip_cma(), we can use folio_migratetype() to replace
get_pageblock_migratetype().

Link: https://lkml.kernel.org/r/20230825075735.52436-1-user@VERNHAO-MC1Signed-off-by: default avatarVern Hao <vernhao@tencent.com>
Reviewed-by: default avatarDavid Hildenbrand <david@redhat.com>
Cc: Zhaoyang Huang <zhaoyang.huang@unisoc.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
parent 80e4a765
......@@ -2271,7 +2271,7 @@ static bool skip_cma(struct folio *folio, struct scan_control *sc)
{
return !current_is_kswapd() &&
gfp_migratetype(sc->gfp_mask) != MIGRATE_MOVABLE &&
get_pageblock_migratetype(&folio->page) == MIGRATE_CMA;
folio_migratetype(folio) == MIGRATE_CMA;
}
#else
static bool skip_cma(struct folio *folio, struct scan_control *sc)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment