Thread (3 messages) 3 messages, 3 authors, 2012-06-22

Re: [PATCH 1/2] memcg: use existing function to judge root mem cgroup

From: Johannes Weiner <hidden>
Date: 2012-06-22 12:29:21
Also in: linux-mm, lkml

On Fri, Jun 22, 2012 at 07:57:22PM +0800, Wanpeng Li wrote:
quoted hunk ↗ jump to hunk
From: Wanpeng Li <redacted>

Signed-off-by: Wanpeng Li <redacted>
---
 mm/memcontrol.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/mm/memcontrol.c b/mm/memcontrol.c
index f72b5e5..776fc57 100644
--- a/mm/memcontrol.c
+++ b/mm/memcontrol.c
@@ -4873,7 +4873,7 @@ mem_cgroup_create(struct cgroup *cont)
 			goto free_out;
 
 	/* root ? */
-	if (cont->parent == NULL) {
+	if (!(mem_cgroup_is_root(cont))) {
cont is struct cgroup *, but this function takes struct mem_cgroup *.
The compiler should have warned you about this.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help