From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from psmtp.com (na3sys010amx105.postini.com [74.125.245.105]) by kanga.kvack.org (Postfix) with SMTP id 479FC6B016F for ; Fri, 22 Jun 2012 08:29:19 -0400 (EDT) Date: Fri, 22 Jun 2012 14:29:07 +0200 From: Johannes Weiner Subject: Re: [PATCH 1/2] memcg: use existing function to judge root mem cgroup Message-ID: <20120622122907.GA20760@cmpxchg.org> 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> Sender: owner-linux-mm@kvack.org List-ID: To: Wanpeng Li Cc: "linux-mm@kvack.org" , cgroups@vger.kernel.org, KAMEZAWA Hiroyuki , Michal Hocko , Frederic Weisbecker , Han Ying , Glauber Costa , Tejun Heo , "Aneesh Kumar K.V" , Andrew Morton , Hiroyuki Kamezawa , Linux Kernel On Fri, Jun 22, 2012 at 07:57:22PM +0800, 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))) { cont is struct cgroup *, but this function takes struct mem_cgroup *. The compiler should have warned you about this. -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: email@kvack.org