lkml.org 
[lkml]   [2008]   [Oct]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH][BUGFIX] memcg: fix page_cgroup allocation
>> --- linux-2.6.orig/mm/page_cgroup.c
>> +++ linux-2.6/mm/page_cgroup.c
>> @@ -4,7 +4,12 @@
>> #include <linux/bit_spinlock.h>
>> #include <linux/page_cgroup.h>
>> #include <linux/hash.h>
>> +#include <linux/slab.h>
>> #include <linux/memory.h>
>> +#include <linux/cgroup.h>
>> +
>> +extern struct cgroup_subsys mem_cgroup_subsys;
>
> no no bad! evil! unclean!
>
> Didn't the linux/cgroup.h -> linux/cgroup_subsys..h inclusion already
> declare this for us?
>

Yes, I think just include <linux/cgroup.h> is enough.

#define SUBSYS(_x) extern struct cgroup_subsys _x ## _subsys;
#include <linux/cgroup_subsys.h>
#undef SUBSYS

and will be expanded to:

extern struct cgroup_subsys cpu_subsys;
extern struct cgroup_subsys cpuset_subsys;
extern struct cgroup_subsys memory_cgroup_subsys;
...



\
 
 \ /
  Last update: 2008-10-22 03:45    [W:0.037 / U:0.320 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site