aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVladimir Davydov <vdavydov@parallels.com>2014-08-08 17:19:26 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2014-08-08 18:57:18 -0400
commit434584fe68155f884b19f32b3befec8972c5d563 (patch)
tree79c54f92ae1362b83398216d45b1b3be49f6d78a
parent747db954cab64c6b7a95b121b517165f34751898 (diff)
page-cgroup: trivial cleanup
Add forward declarations for struct pglist_data, mem_cgroup. Remove __init, __meminit from function prototypes and inline functions. Remove redundant inclusion of bit_spinlock.h. Signed-off-by: Vladimir Davydov <vdavydov@parallels.com> Acked-by: Michal Hocko <mhocko@suse.cz> Acked-by: Johannes Weiner <hannes@cmpxchg.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
-rw-r--r--include/linux/page_cgroup.h22
1 files changed, 11 insertions, 11 deletions
diff --git a/include/linux/page_cgroup.h b/include/linux/page_cgroup.h
index 9bfb8e68a595..b8f8c9e36a3e 100644
--- a/include/linux/page_cgroup.h
+++ b/include/linux/page_cgroup.h
@@ -12,8 +12,10 @@ enum {
12#ifndef __GENERATING_BOUNDS_H 12#ifndef __GENERATING_BOUNDS_H
13#include <generated/bounds.h> 13#include <generated/bounds.h>
14 14
15struct pglist_data;
16
15#ifdef CONFIG_MEMCG 17#ifdef CONFIG_MEMCG
16#include <linux/bit_spinlock.h> 18struct mem_cgroup;
17 19
18/* 20/*
19 * Page Cgroup can be considered as an extended mem_map. 21 * Page Cgroup can be considered as an extended mem_map.
@@ -27,16 +29,16 @@ struct page_cgroup {
27 struct mem_cgroup *mem_cgroup; 29 struct mem_cgroup *mem_cgroup;
28}; 30};
29 31
30void __meminit pgdat_page_cgroup_init(struct pglist_data *pgdat); 32extern void pgdat_page_cgroup_init(struct pglist_data *pgdat);
31 33
32#ifdef CONFIG_SPARSEMEM 34#ifdef CONFIG_SPARSEMEM
33static inline void __init page_cgroup_init_flatmem(void) 35static inline void page_cgroup_init_flatmem(void)
34{ 36{
35} 37}
36extern void __init page_cgroup_init(void); 38extern void page_cgroup_init(void);
37#else 39#else
38void __init page_cgroup_init_flatmem(void); 40extern void page_cgroup_init_flatmem(void);
39static inline void __init page_cgroup_init(void) 41static inline void page_cgroup_init(void)
40{ 42{
41} 43}
42#endif 44#endif
@@ -48,11 +50,10 @@ static inline int PageCgroupUsed(struct page_cgroup *pc)
48{ 50{
49 return !!(pc->flags & PCG_USED); 51 return !!(pc->flags & PCG_USED);
50} 52}
51 53#else /* !CONFIG_MEMCG */
52#else /* CONFIG_MEMCG */
53struct page_cgroup; 54struct page_cgroup;
54 55
55static inline void __meminit pgdat_page_cgroup_init(struct pglist_data *pgdat) 56static inline void pgdat_page_cgroup_init(struct pglist_data *pgdat)
56{ 57{
57} 58}
58 59
@@ -65,10 +66,9 @@ static inline void page_cgroup_init(void)
65{ 66{
66} 67}
67 68
68static inline void __init page_cgroup_init_flatmem(void) 69static inline void page_cgroup_init_flatmem(void)
69{ 70{
70} 71}
71
72#endif /* CONFIG_MEMCG */ 72#endif /* CONFIG_MEMCG */
73 73
74#include <linux/swap.h> 74#include <linux/swap.h>