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

Commit 7bf6f154 authored by qctecmdr Service's avatar qctecmdr Service Committed by Gerrit - the friendly Code Review server
Browse files

Merge "ion: Ensure correct heap type set during heap drain"

parents dd129599 8eae5b79
Loading
Loading
Loading
Loading
+5 −3
Original line number Diff line number Diff line
@@ -160,7 +160,8 @@ size_t ion_system_secure_heap_page_pool_total(struct ion_heap *heap,
	return total << PAGE_SHIFT;
}

static void process_one_shrink(struct ion_heap *sys_heap,
static void process_one_shrink(struct ion_system_secure_heap *secure_heap,
			       struct ion_heap *sys_heap,
			       struct prefetch_info *info)
{
	struct ion_buffer buffer;
@@ -168,7 +169,7 @@ static void process_one_shrink(struct ion_heap *sys_heap,
	int ret;

	memset(&buffer, 0, sizeof(struct ion_buffer));
	buffer.heap = sys_heap;
	buffer.heap = &secure_heap->heap;
	buffer.flags = info->vmid;

	pool_size = ion_system_secure_heap_page_pool_total(sys_heap,
@@ -182,6 +183,7 @@ static void process_one_shrink(struct ion_heap *sys_heap,
	}

	buffer.private_flags = ION_PRIV_FLAG_SHRINKER_FREE;
	buffer.heap = sys_heap;
	sys_heap->ops->free(&buffer);
}

@@ -201,7 +203,7 @@ static void ion_system_secure_heap_prefetch_work(struct work_struct *work)
		spin_unlock_irqrestore(&secure_heap->work_lock, flags);

		if (info->shrink)
			process_one_shrink(sys_heap, info);
			process_one_shrink(secure_heap, sys_heap, info);
		else
			process_one_prefetch(sys_heap, info);