sched: remove redundant NULL cgroup check in task_group_path()
authorLi Zefan <lizefan@huawei.com>
Thu, 24 Jan 2013 06:31:11 +0000 (14:31 +0800)
committerTejun Heo <tj@kernel.org>
Thu, 24 Jan 2013 20:05:18 +0000 (12:05 -0800)
A task_group won't be online (thus no one can see it) until
cpu_cgroup_css_online(), and at that time tg->css.cgroup has
been initialized, so this NULL check is redundant.

Signed-off-by: Li Zefan <lizefan@huawei.com>
Signed-off-by: Tejun Heo <tj@kernel.org>
kernel/sched/debug.c

index 2cd3c1b4e582857eefb87fa9a98fb9cad11509a6..38df0db9660853e0521464cf262863f21691a5ef 100644 (file)
@@ -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;
 }