diff options
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/memcontrol.h | 6 | ||||
| -rw-r--r-- | include/linux/swap.h | 8 |
2 files changed, 8 insertions, 6 deletions
diff --git a/include/linux/memcontrol.h b/include/linux/memcontrol.h index 9724a38ee69d..50940da6adf3 100644 --- a/include/linux/memcontrol.h +++ b/include/linux/memcontrol.h | |||
| @@ -84,6 +84,7 @@ int task_in_mem_cgroup(struct task_struct *task, const struct mem_cgroup *mem); | |||
| 84 | 84 | ||
| 85 | extern struct mem_cgroup *try_get_mem_cgroup_from_page(struct page *page); | 85 | extern struct mem_cgroup *try_get_mem_cgroup_from_page(struct page *page); |
| 86 | extern struct mem_cgroup *mem_cgroup_from_task(struct task_struct *p); | 86 | extern struct mem_cgroup *mem_cgroup_from_task(struct task_struct *p); |
| 87 | extern struct mem_cgroup *try_get_mem_cgroup_from_mm(struct mm_struct *mm); | ||
| 87 | 88 | ||
| 88 | static inline | 89 | static inline |
| 89 | int mm_match_cgroup(const struct mm_struct *mm, const struct mem_cgroup *cgroup) | 90 | int mm_match_cgroup(const struct mm_struct *mm, const struct mem_cgroup *cgroup) |
| @@ -246,6 +247,11 @@ static inline struct mem_cgroup *try_get_mem_cgroup_from_page(struct page *page) | |||
| 246 | return NULL; | 247 | return NULL; |
| 247 | } | 248 | } |
| 248 | 249 | ||
| 250 | static inline struct mem_cgroup *try_get_mem_cgroup_from_mm(struct mm_struct *mm) | ||
| 251 | { | ||
| 252 | return NULL; | ||
| 253 | } | ||
| 254 | |||
| 249 | static inline int mm_match_cgroup(struct mm_struct *mm, struct mem_cgroup *mem) | 255 | static inline int mm_match_cgroup(struct mm_struct *mm, struct mem_cgroup *mem) |
| 250 | { | 256 | { |
| 251 | return 1; | 257 | return 1; |
diff --git a/include/linux/swap.h b/include/linux/swap.h index 384eb5fe530b..e70564647039 100644 --- a/include/linux/swap.h +++ b/include/linux/swap.h | |||
| @@ -358,6 +358,7 @@ struct backing_dev_info; | |||
| 358 | extern struct mm_struct *swap_token_mm; | 358 | extern struct mm_struct *swap_token_mm; |
| 359 | extern void grab_swap_token(struct mm_struct *); | 359 | extern void grab_swap_token(struct mm_struct *); |
| 360 | extern void __put_swap_token(struct mm_struct *); | 360 | extern void __put_swap_token(struct mm_struct *); |
| 361 | extern void disable_swap_token(struct mem_cgroup *memcg); | ||
| 361 | 362 | ||
| 362 | static inline int has_swap_token(struct mm_struct *mm) | 363 | static inline int has_swap_token(struct mm_struct *mm) |
| 363 | { | 364 | { |
| @@ -370,11 +371,6 @@ static inline void put_swap_token(struct mm_struct *mm) | |||
| 370 | __put_swap_token(mm); | 371 | __put_swap_token(mm); |
| 371 | } | 372 | } |
| 372 | 373 | ||
| 373 | static inline void disable_swap_token(void) | ||
| 374 | { | ||
| 375 | put_swap_token(swap_token_mm); | ||
| 376 | } | ||
| 377 | |||
| 378 | #ifdef CONFIG_CGROUP_MEM_RES_CTLR | 374 | #ifdef CONFIG_CGROUP_MEM_RES_CTLR |
| 379 | extern void | 375 | extern void |
| 380 | mem_cgroup_uncharge_swapcache(struct page *page, swp_entry_t ent, bool swapout); | 376 | mem_cgroup_uncharge_swapcache(struct page *page, swp_entry_t ent, bool swapout); |
| @@ -500,7 +496,7 @@ static inline int has_swap_token(struct mm_struct *mm) | |||
| 500 | return 0; | 496 | return 0; |
| 501 | } | 497 | } |
| 502 | 498 | ||
| 503 | static inline void disable_swap_token(void) | 499 | static inline void disable_swap_token(struct mem_cgroup *memcg) |
| 504 | { | 500 | { |
| 505 | } | 501 | } |
| 506 | 502 | ||
