mirror of
https://github.com/nxp-imx/linux-imx.git
synced 2025-07-17 06:39:37 +02:00
mm/vmscan: use folio_migratetype() instead of get_pageblock_migratetype()
[ Upstream commit97144ce008
] In skip_cma(), we can use folio_migratetype() to replace get_pageblock_migratetype(). Link: https://lkml.kernel.org/r/20230825075735.52436-1-user@VERNHAO-MC1 Signed-off-by: Vern Hao <vernhao@tencent.com> Reviewed-by: David Hildenbrand <david@redhat.com> Cc: Zhaoyang Huang <zhaoyang.huang@unisoc.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Stable-dep-of:bfe0857c20
("Revert "mm: skip CMA pages when they are not available"") Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
parent
c4b69bee3f
commit
9a9974713d
|
@ -2271,7 +2271,7 @@ static bool skip_cma(struct folio *folio, struct scan_control *sc)
|
||||||
{
|
{
|
||||||
return !current_is_kswapd() &&
|
return !current_is_kswapd() &&
|
||||||
gfp_migratetype(sc->gfp_mask) != MIGRATE_MOVABLE &&
|
gfp_migratetype(sc->gfp_mask) != MIGRATE_MOVABLE &&
|
||||||
get_pageblock_migratetype(&folio->page) == MIGRATE_CMA;
|
folio_migratetype(folio) == MIGRATE_CMA;
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
static bool skip_cma(struct folio *folio, struct scan_control *sc)
|
static bool skip_cma(struct folio *folio, struct scan_control *sc)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user