Merge "mm: cma: retry only on EBUSY"

This commit is contained in:
qctecmdr 2019-10-25 00:25:58 -07:00 • committed by Gerrit - the friendly Code Review server
commit 7cadb9f2ea

View file

@ -482,7 +482,8 @@ struct page *cma_alloc(struct cma *cma, size_t count, unsigned int align,
bitmap_maxno, start, bitmap_count, mask,
offset);
if (bitmap_no >= bitmap_maxno) {
if (retry_after_sleep < max_retries) {
if ((retry_after_sleep < max_retries) &&
(ret == -EBUSY)) {
start = 0;
/*
* update max retries if available free regions