diff options
author | Kamalesh Babulal <kamalesh.babulal@oracle.com> | 2023-07-17 17:39:23 +0300 |
---|---|---|
committer | Tejun Heo <tj@kernel.org> | 2023-07-17 21:44:56 +0300 |
commit | c25ff4b911a11908c7f05bc07cc6762f9cece2b5 (patch) | |
tree | 6d698fef173473891b80044b54c13918f160fd63 /kernel/cgroup/cgroup.c | |
parent | 6f71780e7fadf778eeb45e830d31339af53533fc (diff) | |
download | linux-c25ff4b911a11908c7f05bc07cc6762f9cece2b5.tar.xz |
cgroup: remove cgrp->kn check in css_populate_dir()
cgroup_create() creates cgrp and assigns the kernfs_node to cgrp->kn,
then cgroup_mkdir() populates base and csses cft file by calling
css_populate_dir() and cgroup_apply_control_enable() with a valid
cgrp->kn. Check for NULL cgrp->kn, will always be false, remove it.
Signed-off-by: Kamalesh Babulal <kamalesh.babulal@oracle.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 aa2cc32e60c0..3c1bb9ecea10 100644 --- a/kernel/cgroup/cgroup.c +++ b/kernel/cgroup/cgroup.c @@ -1714,7 +1714,7 @@ static int css_populate_dir(struct cgroup_subsys_state *css) struct cftype *cfts, *failed_cfts; int ret; - if ((css->flags & CSS_VISIBLE) || !cgrp->kn) + if (css->flags & CSS_VISIBLE) return 0; if (!css->ss) { |