/* Adds the task to the list running through its css_set if necessary. Has to be after the task is visible on the task list in case we race with the first call to cgroup_iter_start() - to guarantee that the new task ends up on its list.  */
void cgroup_post_fork(struct task_struct *child)
/* Adds the task to the list running through its css_set if necessary. Has to be after the task is visible on the task list in case we race with the first call to cgroup_iter_start() - to guarantee that the new task ends up on its list.  */
void cgroup_post_fork(struct task_struct *child)
{
	if (use_task_css_set_links) {
		write_lock(&css_set_lock);
		task_lock(child);
		if (list_empty(&child->cg_list))
			list_add(&child->cg_list, &child->cgroups->tasks);
		task_unlock(child);
		write_unlock(&css_set_lock);
	}
}