Messages in this thread | | | Date | Fri, 10 Dec 2021 09:06:21 -1000 | From | Tejun Heo <> | Subject | Re: [PATCH 2/6] cgroup: Allocate cgroup_file_ctx for kernfs_open_file->priv |
| |
On Fri, Dec 10, 2021 at 10:45:33AM -0800, Linus Torvalds wrote: > 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?
Just so that I'm understanding you correctly. The following is what I was suggesting. ie. just dropping the union and making the iterator embedded:
struct cgroup_file_ctx { struct cgroup_namespace ns;
struct { struct css_task_iter it; } procs;
struct { void *trigger; } psi; };
and I was wondering whether you wanted something like the following:
struct cgroup_file_ctx { struct cgroup_namespace ns; struct css_task_iter it; void *trigger; };
Thanks.
-- tejun
| |