cgroup/pids: Remove unreachable paths of pids_{can,cancel}_fork
authorXiu Jianfeng <xiujianfeng@huawei.com>
Mon, 5 Aug 2024 00:43:04 +0000 (00:43 +0000)
committerTejun Heo <tj@kernel.org>
Mon, 5 Aug 2024 20:32:16 +0000 (10:32 -1000)
commit4980f712023a1c0c26a12f5212ced34587d81663
treec2f690efda762b9c5ac1072e26769cb741d2a5cf
parent563ea1f5f85171b68f9075f5c3c22c4b521f1b5e
cgroup/pids: Remove unreachable paths of pids_{can,cancel}_fork

According to the implementation of cgroup_css_set_fork(), it will fail
if cset cannot be found and the can_fork/cancel_fork methods will not
be called in this case, which means that the argument 'cset' for these
methods must not be NULL, so remove the unrechable paths in them.

Signed-off-by: Xiu Jianfeng <xiujianfeng@huawei.com>
Reviewed-by: Waiman Long <longman@redhat.com>
Signed-off-by: Tejun Heo <tj@kernel.org>
kernel/cgroup/pids.c