linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] memcg: include linux/mm.h
@ 2015-10-16 20:03 Arnd Bergmann
  2015-10-16 20:48 ` Kirill A. Shutemov
  0 siblings, 1 reply; 2+ messages in thread
From: Arnd Bergmann @ 2015-10-16 20:03 UTC (permalink / raw)
  To: linux-arm-kernel

A recent change to the memcg code added a call to virt_to_head_page,
which is declared in linux/mm.h, but this is not necessarily included
here and will cause compile errors:

include/linux/memcontrol.h:841:9: error: implicit declaration of function 'virt_to_head_page' [-Werror=implicit-function-declaration]

This adds an explicit include statement that gets rid of the error.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Fixes: 1ead4c071978 ("memcg: simplify and inline __mem_cgroup_from_kmem")

diff --git a/include/linux/memcontrol.h b/include/linux/memcontrol.h
index 47677acb4516..6d18936df7e8 100644
--- a/include/linux/memcontrol.h
+++ b/include/linux/memcontrol.h
@@ -27,6 +27,7 @@
 #include <linux/vmpressure.h>
 #include <linux/eventfd.h>
 #include <linux/mmzone.h>
+#include <linux/mm.h>
 #include <linux/writeback.h>
 
 struct mem_cgroup;

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [PATCH] memcg: include linux/mm.h
  2015-10-16 20:03 [PATCH] memcg: include linux/mm.h Arnd Bergmann
@ 2015-10-16 20:48 ` Kirill A. Shutemov
  0 siblings, 0 replies; 2+ messages in thread
From: Kirill A. Shutemov @ 2015-10-16 20:48 UTC (permalink / raw)
  To: linux-arm-kernel

On Fri, Oct 16, 2015 at 10:03:31PM +0200, Arnd Bergmann wrote:
> A recent change to the memcg code added a call to virt_to_head_page,
> which is declared in linux/mm.h, but this is not necessarily included
> here and will cause compile errors:
> 
> include/linux/memcontrol.h:841:9: error: implicit declaration of function 'virt_to_head_page' [-Werror=implicit-function-declaration]
> 
> This adds an explicit include statement that gets rid of the error.
> 
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> Fixes: 1ead4c071978 ("memcg: simplify and inline __mem_cgroup_from_kmem")

http://lkml.kernel.org/g/20151016131726.GA602 at node.shutemov.name

-- 
 Kirill A. Shutemov

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2015-10-16 20:48 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-10-16 20:03 [PATCH] memcg: include linux/mm.h Arnd Bergmann
2015-10-16 20:48 ` Kirill A. Shutemov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).