Unverified Commit 7b3072c2 authored by openeuler-ci-bot's avatar openeuler-ci-bot Committed by Gitee
Browse files

!1558 [sync] PR-1548: mm: memcontrol: fix cannot alloc the maximum memcg ID

parents 8536c35b ef15a6fe
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -5491,8 +5491,7 @@ static struct mem_cgroup *mem_cgroup_alloc(void)
		return ERR_PTR(error);

	memcg->id.id = idr_alloc(&mem_cgroup_idr, NULL,
				 1, MEM_CGROUP_ID_MAX,
				 GFP_KERNEL);
				 1, MEM_CGROUP_ID_MAX + 1, GFP_KERNEL);
	if (memcg->id.id < 0) {
		error = memcg->id.id;
		goto fail;