From mboxrd@z Thu Jan 1 00:00:00 1970 From: Li Zefan Subject: [PATCH 3/6] sched: remove redundant NULL cgroup check in task_group_path() Date: Thu, 17 Jan 2013 16:03:47 +0800 Message-ID: <50F7B063.6040004@huawei.com> References: <50F7B040.2020906@huawei.com> Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <50F7B040.2020906-hv44wF8Li93QT0dZR+AlfA@public.gmane.org> Sender: cgroups-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org List-ID: Content-Type: text/plain; charset="us-ascii" To: Tejun Heo Cc: Peter Zijlstra , Ingo Molnar , LKML , Cgroups cpu_cgroup_css_online() is called after cgroup is fully created, and it makes this check redundant. Signed-off-by: Li Zefan --- kernel/sched/debug.c | 7 ------- 1 file changed, 7 deletions(-) diff --git a/kernel/sched/debug.c b/kernel/sched/debug.c index 2cd3c1b..38df0db 100644 --- a/kernel/sched/debug.c +++ b/kernel/sched/debug.c @@ -110,13 +110,6 @@ static char *task_group_path(struct task_group *tg) if (autogroup_path(tg, group_path, PATH_MAX)) return group_path; - /* - * May be NULL if the underlying cgroup isn't fully-created yet - */ - if (!tg->css.cgroup) { - group_path[0] = '\0'; - return group_path; - } cgroup_path(tg->css.cgroup, group_path, PATH_MAX); return group_path; } -- 1.8.0.2 From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1759322Ab3AQIFI (ORCPT ); Thu, 17 Jan 2013 03:05:08 -0500 Received: from szxga02-in.huawei.com ([119.145.14.65]:35771 "EHLO szxga02-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1759261Ab3AQIEZ (ORCPT ); Thu, 17 Jan 2013 03:04:25 -0500 Message-ID: <50F7B063.6040004@huawei.com> Date: Thu, 17 Jan 2013 16:03:47 +0800 From: Li Zefan User-Agent: Mozilla/5.0 (Windows NT 6.1; rv:17.0) Gecko/20130107 Thunderbird/17.0.2 MIME-Version: 1.0 To: Tejun Heo CC: Peter Zijlstra , Ingo Molnar , LKML , Cgroups Subject: [PATCH 3/6] sched: remove redundant NULL cgroup check in task_group_path() References: <50F7B040.2020906@huawei.com> In-Reply-To: <50F7B040.2020906@huawei.com> Content-Type: text/plain; charset="GB2312" Content-Transfer-Encoding: 7bit X-Originating-IP: [10.135.68.215] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org cpu_cgroup_css_online() is called after cgroup is fully created, and it makes this check redundant. Signed-off-by: Li Zefan --- kernel/sched/debug.c | 7 ------- 1 file changed, 7 deletions(-) diff --git a/kernel/sched/debug.c b/kernel/sched/debug.c index 2cd3c1b..38df0db 100644 --- a/kernel/sched/debug.c +++ b/kernel/sched/debug.c @@ -110,13 +110,6 @@ static char *task_group_path(struct task_group *tg) if (autogroup_path(tg, group_path, PATH_MAX)) return group_path; - /* - * May be NULL if the underlying cgroup isn't fully-created yet - */ - if (!tg->css.cgroup) { - group_path[0] = '\0'; - return group_path; - } cgroup_path(tg->css.cgroup, group_path, PATH_MAX); return group_path; } -- 1.8.0.2