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

Commit d480fe21 authored by Amit Pundir's avatar Amit Pundir Committed by Dmitry Shmidt
Browse files

ion: fix page pool cache policy



Fix redundant "buffer->private_flags & ION_PRIV_FLAG_SHRINKER_FREE"
checks in if(!cached ...) condition block.

AOSP Change-Id: I98ee8902df0c80135dddfa998c4ca4c2bb44e40e,
"ion: Handle the memory mapping correctly on x86", is broken
on android-3.18+ kernels. It conflicts with upstream commit
53a91c68, "staging: ion: Add private buffer flag to skip
page pooling on free", and break the ION_PRIV_FLAG_SHRINKER_FREE
private flag check logic.

Change-Id: I9cee4bcc3545cf92e07c21c2b42d27cf88da3316
Reported-by: default avatarchenfeng <puck.chen@hisilicon.com>
Signed-off-by: default avatarAmit Pundir <amit.pundir@linaro.org>
parent 6d2862fa
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -83,7 +83,7 @@ static void free_buffer_page(struct ion_system_heap *heap,
	unsigned int order = compound_order(page);
	bool cached = ion_buffer_cached(buffer);

	if (!cached && !(buffer->private_flags & ION_PRIV_FLAG_SHRINKER_FREE)) {
	if (!cached) {
		struct ion_page_pool *pool = heap->pools[order_to_index(order)];
		if (buffer->private_flags & ION_PRIV_FLAG_SHRINKER_FREE)
			ion_page_pool_free_immediate(pool, page);