Skip to content

Commit

Permalink
cgroup: remove a NULL check in cgroup_exit()
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Li Zefan authored and Tejun Heo committed Jan 24, 2013
1 parent 2739d3c commit b5d646f
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions kernel/cgroup.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

/**
Expand Down

0 comments on commit b5d646f

Please sign in to comment.