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

From: Linus Torvalds
Date: Fri Dec 10 2021 - 13:51:51 EST


On Fri, Dec 10, 2021 at 10:38 AM Tejun Heo <tj@xxxxxxxxxx> wrote:
>
> It's a bit of bikeshedding but I wanna explicitly denote who at currently
> uses the fields, so how about nested structs w/ embedded iterator?

I don't mind being careful about uses if it makes sense and it's
really statically obvious and never used outside that one file so you
have no non-local cases,,,

Yeah, you export the struct in an internal header file right now, but
I think that is just for the upcoming 'ns' member, not the union
members.

But if it then ever becomes a possible source of confusion and it's
not obvious from the context who uses what, I'd rather use the extra 8
bytes in the allocation.

Ok?

Linus