[PATCH] memcg: include linux/mm.h

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

 



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@xxxxxxxx>
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;

--
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]