From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from psmtp.com (na3sys010amx104.postini.com [74.125.245.104]) by kanga.kvack.org (Postfix) with SMTP id C2E596B0044 for ; Mon, 30 Apr 2012 04:50:50 -0400 (EDT) Received: from /spool/local by e28smtp07.in.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Mon, 30 Apr 2012 14:20:47 +0530 Received: from d28av01.in.ibm.com (d28av01.in.ibm.com [9.184.220.63]) by d28relay01.in.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id q3U8ohAR23331052 for ; Mon, 30 Apr 2012 14:20:43 +0530 Received: from d28av01.in.ibm.com (loopback [127.0.0.1]) by d28av01.in.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id q3UEKLqa032090 for ; Mon, 30 Apr 2012 19:50:23 +0530 From: "Aneesh Kumar K.V" Subject: Re: [RFC][PATCH 2/7 v2] memcg: fix error code in hugetlb_force_memcg_empty() In-Reply-To: <4F9A33CB.8040304@jp.fujitsu.com> References: <4F9A327A.6050409@jp.fujitsu.com> <4F9A33CB.8040304@jp.fujitsu.com>User-Agent: Notmuch/0.11.1+346~g13d19c3 (http://notmuchmail.org) Emacs/23.3.1 (x86_64-pc-linux-gnu) Date: Mon, 30 Apr 2012 14:19:46 +0530 Message-ID: <87y5pd8uz9.fsf@skywalker.in.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Sender: owner-linux-mm@kvack.org List-ID: To: KAMEZAWA Hiroyuki , Linux Kernel Cc: "linux-mm@kvack.org" , "cgroups@vger.kernel.org" , Michal Hocko , Johannes Weiner , Frederic Weisbecker , Glauber Costa , Tejun Heo , Han Ying , Andrew Morton , kamezawa.hiroyuki@gmail.com KAMEZAWA Hiroyuki writes: > EBUSY should be returned. > > Signed-off-by: KAMEZAWA Hiroyuki > --- > mm/hugetlb.c | 5 ++++- > 1 files changed, 4 insertions(+), 1 deletions(-) > > diff --git a/mm/hugetlb.c b/mm/hugetlb.c > index 17ae2e4..4dd6b39 100644 > --- a/mm/hugetlb.c > +++ b/mm/hugetlb.c > @@ -1922,8 +1922,11 @@ int hugetlb_force_memcg_empty(struct cgroup *cgroup) > int ret = 0, idx = 0; > > do { > - if (cgroup_task_count(cgroup) || !list_empty(&cgroup->children)) > + if (cgroup_task_count(cgroup) > + || !list_empty(&cgroup->children)) { > + ret = -EBUSY; > goto out; > + } > /* > * If the task doing the cgroup_rmdir got a signal > * we don't really need to loop till the hugetlb resource Reviewed-by: Aneesh Kumar K.V -aneesh -- 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