Re: [PATCH v2] memcg: clean up networking headers file inclusion

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri 14-09-12 15:21:29, Glauber Costa wrote:
> On 09/14/2012 03:21 PM, Michal Hocko wrote:
> > Hi,
> > so I did some more changes to ifdefery of sock kmem part. The patch is
> > below. 
> > Glauber please have a look at it. I do not think any of the
> > functionality wrapped inside CONFIG_MEMCG_KMEM without CONFIG_INET is
> > reusable for generic CONFIG_MEMCG_KMEM, right?
> Almost right.
> 
> 
> 
> >  }
> >  
> >  /* Writing them here to avoid exposing memcg's inner layout */
> > -#ifdef CONFIG_MEMCG_KMEM
> > -#include <net/sock.h>
> > -#include <net/ip.h>
> > +#if defined(CONFIG_INET) && defined(CONFIG_MEMCG_KMEM)
> >  
> >  static bool mem_cgroup_is_root(struct mem_cgroup *memcg);
> 
> This one is. ^^^^

But this is just a forward declaration. And btw. it makes my compiler
complain about:
mm/memcontrol.c:421: warning: ‘mem_cgroup_is_root’ declared inline after being called
mm/memcontrol.c:421: warning: previous declaration of ‘mem_cgroup_is_root’ was here

But I didn't care much yet. It is probaly that my compiler is too old to
be clever about this.
-- 
Michal Hocko
SUSE Labs

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@xxxxxxxxx.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@xxxxxxxxx";> email@xxxxxxxxx </a>


[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]