mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] cgroup: update comment about dropping cgroup kn refs
@ 2025-01-12 14:49 Haorui He
  2025-01-13 13:34 ` Michal Koutný
  2025-01-13 18:26 ` Tejun Heo
  0 siblings, 2 replies; 4+ messages in thread
From: Haorui He @ 2025-01-12 14:49 UTC (permalink / raw)
  To: cgroups; +Cc: linux-kernel, mkoutny, hannes, tj, Haorui He

the cgroup is actually freed in css_free_rwork_fn() now
the ref count of the cgroup's kernfs_node is also dropped there
so we need to update the corresponding comment in cgroup_mkdir()

Signed-off-by: Haorui He <mail@hehaorui.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 d9061bd55436..805764cf14e2 100644
--- a/kernel/cgroup/cgroup.c
+++ b/kernel/cgroup/cgroup.c
@@ -5835,7 +5835,7 @@ int cgroup_mkdir(struct kernfs_node *parent_kn, const char *name, umode_t mode)
 	}
 
 	/*
-	 * This extra ref will be put in cgroup_free_fn() and guarantees
+	 * This extra ref will be put in css_free_rwork_fn() and guarantees
 	 * that @cgrp->kn is always accessible.
 	 */
 	kernfs_get(cgrp->kn);
-- 
2.47.1


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] cgroup: update comment about dropping cgroup kn refs
  2025-01-12 14:49 [PATCH] cgroup: update comment about dropping cgroup kn refs Haorui He
@ 2025-01-13 13:34 ` Michal Koutný
  2025-01-13 15:25   ` Haorui He
  2025-01-13 18:26 ` Tejun Heo
  1 sibling, 1 reply; 4+ messages in thread
From: Michal Koutný @ 2025-01-13 13:34 UTC (permalink / raw)
  To: Haorui He; +Cc: cgroups, linux-kernel, hannes, tj

[-- Attachment #1: Type: text/plain, Size: 444 bytes --]

Hello Haorui.

On Sun, Jan 12, 2025 at 10:49:20PM +0800, Haorui He <mail@hehaorui.com> wrote:
> the cgroup is actually freed in css_free_rwork_fn() now
> the ref count of the cgroup's kernfs_node is also dropped there
> so we need to update the corresponding comment in cgroup_mkdir()

It seems you've read through the comments recently.
Do you have more up your sleeve? (So that it could be grouped in one
comments changeset.)

Thanks,
Michal

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] cgroup: update comment about dropping cgroup kn refs
  2025-01-13 13:34 ` Michal Koutný
@ 2025-01-13 15:25   ` Haorui He
  0 siblings, 0 replies; 4+ messages in thread
From: Haorui He @ 2025-01-13 15:25 UTC (permalink / raw)
  To: Michal Koutný; +Cc: cgroups, linux-kernel

Hello Michal.


On 2025/1/13 21:34, Michal Koutný wrote:
> It seems you've read through the comments recently.
> Do you have more up your sleeve? (So that it could be grouped in one
> comments changeset.)

No, I have not find more right now. I'm just reading the cgroups code 
and happen to be confused by that comment.
I'm still reading about the cgroups code base though, so I'm not sure 
whether I will find more places that need to be updated.

Thanks,
Haorui He




^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] cgroup: update comment about dropping cgroup kn refs
  2025-01-12 14:49 [PATCH] cgroup: update comment about dropping cgroup kn refs Haorui He
  2025-01-13 13:34 ` Michal Koutný
@ 2025-01-13 18:26 ` Tejun Heo
  1 sibling, 0 replies; 4+ messages in thread
From: Tejun Heo @ 2025-01-13 18:26 UTC (permalink / raw)
  To: Haorui He; +Cc: cgroups, linux-kernel, mkoutny, hannes

On Sun, Jan 12, 2025 at 10:49:20PM +0800, Haorui He wrote:
> the cgroup is actually freed in css_free_rwork_fn() now
> the ref count of the cgroup's kernfs_node is also dropped there
> so we need to update the corresponding comment in cgroup_mkdir()
> 
> Signed-off-by: Haorui He <mail@hehaorui.com>

Applied to sched_ext/for-6.14.

Thanks.

-- 
tejun

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2025-01-13 18:26 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-01-12 14:49 [PATCH] cgroup: update comment about dropping cgroup kn refs Haorui He
2025-01-13 13:34 ` Michal Koutný
2025-01-13 15:25   ` Haorui He
2025-01-13 18:26 ` 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®