On Fri, Oct 16, 2015 at 03:12:23PM -0700, Hugh Dickins wrote: > --- 4035m/mm/list_lru.c 2015-10-15 15:26:59.835572128 -0700 > +++ 4035M/mm/list_lru.c 2015-10-16 03:11:51.000000000 -0700 > @@ -63,6 +63,16 @@ list_lru_from_memcg_idx(struct list_lru_ > return &nlru->lru; > } > > +static __always_inline struct mem_cgroup *mem_cgroup_from_kmem(void *ptr) > +{ > + struct page *page; > + > + if (!memcg_kmem_enabled()) > + return NULL; > + page = virt_to_head_page(ptr); > + return page->mem_cgroup; > +} > + > static inline struct list_lru_one * > list_lru_from_kmem(struct list_lru_node *nlru, void *ptr) > { I like this better than the mm.h include, too. -- 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>