mirror of
https://github.com/torvalds/linux.git
synced 2026-06-08 14:42:37 +02:00
ANDROID: Fix kernelci build-break on !CONFIG_CMA builds
commitc29070e5b9("ANDROID: GKI: cma: redirect page allocation to CMA") added the field cma_alloc to struct zone if CONFIG_CMA. However, two references to cma_alloc were added in mm/page_alloc.c that could be reached if CONFIG_MEMORY_ISOLATION and CONFIG_COMPACTION are defined. Fixes:c29070e5b9("ANDROID: GKI: cma: redirect page allocation to CMA") Signed-off-by: Todd Kjos <tkjos@google.com> Change-Id: I3a4b803612084a070ba3cc0af11808bea20d324e
This commit is contained in:
parent
89666477b2
commit
75acd190bd
|
|
@ -8231,7 +8231,9 @@ int alloc_contig_range(unsigned long start, unsigned long end,
|
|||
if (ret)
|
||||
return ret;
|
||||
|
||||
#ifdef CONFIG_CMA
|
||||
cc.zone->cma_alloc = 1;
|
||||
#endif
|
||||
/*
|
||||
* In case of -EBUSY, we'd like to know which page causes problem.
|
||||
* So, just fall through. test_pages_isolated() has a tracepoint
|
||||
|
|
@ -8314,7 +8316,9 @@ int alloc_contig_range(unsigned long start, unsigned long end,
|
|||
done:
|
||||
undo_isolate_page_range(pfn_max_align_down(start),
|
||||
pfn_max_align_up(end), migratetype);
|
||||
#ifdef CONFIG_CMA
|
||||
cc.zone->cma_alloc = 0;
|
||||
#endif
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user