diff options
author | Shida Zhang <starzhangzsd@gmail.com> | 2022-05-18 03:36:47 +0200 |
---|---|---|
committer | Tejun Heo <tj@kernel.org> | 2022-05-20 09:49:45 +0200 |
commit | b154a017c92011d8f71ce804583e5f9c3d90bb9a (patch) | |
tree | af8175b607dfe7ab069fc0763ff0d87f95d76f3f /kernel/cgroup/cgroup.c | |
parent | cgroup: Make cgroup_debug static (diff) | |
download | linux-b154a017c92011d8f71ce804583e5f9c3d90bb9a.tar.xz linux-b154a017c92011d8f71ce804583e5f9c3d90bb9a.zip |
cgroup: remove the superfluous judgment
Remove the superfluous judgment since the function is
never called for a root cgroup, as suggested by Tejun.
Suggested-by: Tejun Heo <tj@kernel.org>
Signed-off-by: Shida Zhang <zhangshida@kylinos.cn>
Reviewed-by: Michal Koutný <mkoutny@suse.com>
Signed-off-by: Tejun Heo <tj@kernel.org>
Diffstat (limited to 'kernel/cgroup/cgroup.c')
-rw-r--r-- | kernel/cgroup/cgroup.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/kernel/cgroup/cgroup.c b/kernel/cgroup/cgroup.c index a97fd051430b..1779ccddb734 100644 --- a/kernel/cgroup/cgroup.c +++ b/kernel/cgroup/cgroup.c @@ -5685,7 +5685,7 @@ static int cgroup_destroy_locked(struct cgroup *cgrp) css_clear_dir(&cgrp->self); kernfs_remove(cgrp->kn); - if (parent && cgroup_is_threaded(cgrp)) + if (cgroup_is_threaded(cgrp)) parent->nr_threaded_children--; spin_lock_irq(&css_set_lock); |