Re: [PATCH 2/6] cgroup: Allocate cgroup_file_ctx for kernfs_open_file->priv

From: Linus Torvalds
Date: Mon Dec 13 2021 - 14:30:03 EST


On Mon, Dec 13, 2021 at 11:18 AM Tejun Heo <tj@xxxxxxxxxx> wrote:
>
> v2: union dropped from cgroup_file_ctx and the procs iterator is embedded in
> cgroup_file_ctx as suggested by Linus.

Thanks.

Looking at the patch, I mostly like the end result, although it
highlights how odd that __cgroup_procs_start() thing is.

I wonder if that 'started' flag could be removed, and the
css_task_iter_start() thing could be done at allocation time?

But I may just be confused. This is not a NAK, just a "that pattern
looks slightly odd to me".

Linus