From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752989Ab1LLOHx (ORCPT ); Mon, 12 Dec 2011 09:07:53 -0500 Received: from cantor2.suse.de ([195.135.220.15]:52540 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752893Ab1LLOHw (ORCPT ); Mon, 12 Dec 2011 09:07:52 -0500 Date: Mon, 12 Dec 2011 15:07:50 +0100 From: Michal Hocko To: Hillf Danton Cc: Hugh Dickins , Balbir Singh , David Rientjes , Andrea Arcangeli , Andrew Morton , Johannes Weiner , KAMEZAWA Hiroyuki , linux-mm@kvack.org, LKML Subject: Re: [PATCH] mm: memcg: keep root group unchanged if fail to create new Message-ID: <20111212140750.GE14720@tiehlicka.suse.cz> References: <20111212131118.GA15249@tiehlicka.suse.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: 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 On Mon 12-12-11 21:49:18, Hillf Danton wrote: [...] > From: Hillf Danton > Subject: [PATCH] mm: memcg: keep root group unchanged if fail to create new > > If the request is to create non-root group and we fail to meet it, we should > leave the root unchanged. > > Signed-off-by: Hillf Danton > Acked-by: Hugh Dickins > Acked-by: KAMEZAWA Hiroyuki Acked-by: Michal Hocko Thanks > --- > > --- a/mm/memcontrol.c Fri Dec 9 21:57:40 2011 > +++ b/mm/memcontrol.c Mon Dec 12 21:47:14 2011 > @@ -4848,9 +4848,9 @@ mem_cgroup_create(struct cgroup_subsys * > int cpu; > enable_swap_cgroup(); > parent = NULL; > - root_mem_cgroup = memcg; > if (mem_cgroup_soft_limit_tree_init()) > goto free_out; > + root_mem_cgroup = memcg; > for_each_possible_cpu(cpu) { > struct memcg_stock_pcp *stock = > &per_cpu(memcg_stock, cpu); > @@ -4888,7 +4888,6 @@ mem_cgroup_create(struct cgroup_subsys * > return &memcg->css; > free_out: > __mem_cgroup_free(memcg); > - root_mem_cgroup = NULL; > return ERR_PTR(error); > } > > -- > 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/ . > Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/ > Don't email: email@kvack.org -- Michal Hocko SUSE Labs SUSE LINUX s.r.o. Lihovarska 1060/12 190 00 Praha 9 Czech Republic