Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1761819Ab2FVM2M (ORCPT ); Fri, 22 Jun 2012 08:28:12 -0400 Received: from cantor2.suse.de ([195.135.220.15]:55177 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755630Ab2FVM2K (ORCPT ); Fri, 22 Jun 2012 08:28:10 -0400 Date: Fri, 22 Jun 2012 14:28:07 +0200 From: Michal Hocko To: Wanpeng Li Cc: "linux-mm@kvack.org" , cgroups@vger.kernel.org, KAMEZAWA Hiroyuki , Johannes Weiner , Frederic Weisbecker , Han Ying , Glauber Costa , Tejun Heo , "Aneesh Kumar K.V" , Andrew Morton , Hiroyuki Kamezawa , Linux Kernel Subject: Re: [PATCH 1/2] memcg: use existing function to judge root mem cgroup Message-ID: <20120622122807.GC4814@tiehlicka.suse.cz> References: <1340366243-28104-1-git-send-email-liwp.linux@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1340366243-28104-1-git-send-email-liwp.linux@gmail.com> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1252 Lines: 45 On Fri 22-06-12 19:57:22, Wanpeng Li wrote: > From: Wanpeng Li > > Signed-off-by: Wanpeng Li > --- > 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))) { This is not correct. mem_cgroup_is_root takes mem_cgroup and you are giving it cgroup, see? > int cpu; > enable_swap_cgroup(); > parent = NULL; > -- > 1.7.9.5 > > -- > To unsubscribe from this list: send the line "unsubscribe cgroups" in > the body of a message to majordomo@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html -- Michal Hocko SUSE Labs SUSE LINUX s.r.o. Lihovarska 1060/12 190 00 Praha 9 Czech Republic -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/