memcg: include linux/mm.h
Subsystems (2)
PATCH 1/1 memcg: include linux/mm.h
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.
include/linux/memcontrol.h +1 -0
@@ -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 ;
Quoted 10 lines · Arnd Bergmann
A recent change to the memcg code added a call to
virt_to_head_page, which is declared inlinux/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 <[email protected]>Fixes 1ead4c071978 ("memcg: simplify and inline __mem_cgroup_from_kmem")
http://lkml.kernel.org/g/20151016131726.GA602 at node.shutemov.name
Signature · 1 line
Kirill A. Shutemov