* [PATCH] cgroup: remove cgrp->kn check in css_populate_dir()
@ 2023-07-17 14:39 Kamalesh Babulal
2023-07-17 18:44 ` Tejun Heo
0 siblings, 1 reply; 2+ messages in thread
From: Kamalesh Babulal @ 2023-07-17 14:39 UTC (permalink / raw)
To: Tejun Heo, Zefan Li, Johannes Weiner; +Cc: Tom Hromatka, cgroups, linux-kernel
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>
---
kernel/cgroup/cgroup.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/kernel/cgroup/cgroup.c b/kernel/cgroup/cgroup.c
index f55a40db065f..5294fbfb4bf4 100644
--- a/kernel/cgroup/cgroup.c
+++ b/kernel/cgroup/cgroup.c
@@ -1736,7 +1736,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) {
base-commit: fdf0eaf11452d72945af31804e2a1048ee1b574c
--
2.34.3
^ permalink raw reply [flat|nested] 2+ messages in thread* Re: [PATCH] cgroup: remove cgrp->kn check in css_populate_dir()
2023-07-17 14:39 [PATCH] cgroup: remove cgrp->kn check in css_populate_dir() Kamalesh Babulal
@ 2023-07-17 18:44 ` Tejun Heo
0 siblings, 0 replies; 2+ messages in thread
From: Tejun Heo @ 2023-07-17 18:44 UTC (permalink / raw)
To: Kamalesh Babulal
Cc: Zefan Li, Johannes Weiner, Tom Hromatka, cgroups, linux-kernel
On Mon, Jul 17, 2023 at 08:09:23PM +0530, Kamalesh Babulal wrote:
> 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>
Applied to cgroup/for-6.6.
Thanks.
--
tejun
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2023-07-17 18:44 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-07-17 14:39 [PATCH] cgroup: remove cgrp->kn check in css_populate_dir() Kamalesh Babulal
2023-07-17 18:44 ` Tejun Heo
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®