Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 6db24fdc authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "staging: android: Reduce allocation time from system heap"

parents dc9eaf74 073c8793
Loading
Loading
Loading
Loading
+7 −7
Original line number Diff line number Diff line
@@ -106,13 +106,13 @@ void *ion_page_pool_alloc(struct ion_page_pool *pool, bool *from_pool)

	*from_pool = true;

	mutex_lock(&pool->mutex);
	if (mutex_trylock(&pool->mutex)) {
		if (pool->high_count)
			page = ion_page_pool_remove(pool, true);
		else if (pool->low_count)
			page = ion_page_pool_remove(pool, false);
		mutex_unlock(&pool->mutex);

	}
	if (!page) {
		page = ion_page_pool_alloc_pages(pool);
		*from_pool = false;