lkml.org 
[lkml]   [2021]   [Dec]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [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

\
 
 \ /
  Last update: 2021-12-10 20:06    [W:5.706 / U:0.008 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site