Messages in this thread | | | Date | Wed, 22 Oct 2008 09:42:41 +0800 | From | Li Zefan <> | Subject | Re: [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; ...
| |