Browse Source

cgroup: remove a NULL check in cgroup_exit()

init_task.cgroups is initialized at boot phase, and whenver a ask
is forked, it's cgroups pointer is inherited from its parent, and
it's never set to NULL afterwards.

Signed-off-by: Li Zefan <lizefan@huawei.com>
Signed-off-by: Tejun Heo <tj@kernel.org>
Li Zefan 12 years ago
parent
commit
b5d646f5d5
1 changed files with 1 additions and 2 deletions
  1. 1 2
      kernel/cgroup.c

+ 1 - 2
kernel/cgroup.c

@@ -4994,8 +4994,7 @@ void cgroup_exit(struct task_struct *tsk, int run_callbacks)
 	}
 	task_unlock(tsk);
 
-	if (cg)
-		put_css_set_taskexit(cg);
+	put_css_set_taskexit(cg);
 }
 
 /**