Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932225Ab2EKJrX (ORCPT ); Fri, 11 May 2012 05:47:23 -0400 Received: from fgwmail6.fujitsu.co.jp ([192.51.44.36]:54690 "EHLO fgwmail6.fujitsu.co.jp" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932109Ab2EKJrU (ORCPT ); Fri, 11 May 2012 05:47:20 -0400 X-SecurityPolicyCheck: OK by SHieldMailChecker v1.7.4 Message-ID: <4FACDFAE.5050808@jp.fujitsu.com> Date: Fri, 11 May 2012 18:45:18 +0900 From: KAMEZAWA Hiroyuki User-Agent: Mozilla/5.0 (Windows NT 6.0; rv:12.0) Gecko/20120428 Thunderbird/12.0.1 MIME-Version: 1.0 To: "linux-mm@kvack.org" CC: "cgroups@vger.kernel.org" , Michal Hocko , Johannes Weiner , Frederic Weisbecker , Han Ying , Glauber Costa , Tejun Heo , "Aneesh Kumar K.V" , Andrew Morton , Hiroyuki Kamezawa , Linux Kernel Subject: [PATCH v3 1/6] memcg: fix error code in hugetlb_force_memcg_empty() References: <4FACDED0.3020400@jp.fujitsu.com> In-Reply-To: <4FACDED0.3020400@jp.fujitsu.com> Content-Type: text/plain; charset=ISO-2022-JP Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1036 Lines: 34 The conditions are handled as -EBUSY, _now_. Reviewed-by: Aneesh Kumar K.V 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 1d3c8ea9..824f07b 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 -- 1.7.4.1 -- 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/