aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/swap.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/swap.h')
-rw-r--r--include/linux/swap.h18
1 files changed, 2 insertions, 16 deletions
diff --git a/include/linux/swap.h b/include/linux/swap.h
index 384eb5fe530b..a273468f8285 100644
--- a/include/linux/swap.h
+++ b/include/linux/swap.h
@@ -300,16 +300,6 @@ static inline void scan_unevictable_unregister_node(struct node *node)
300extern int kswapd_run(int nid); 300extern int kswapd_run(int nid);
301extern void kswapd_stop(int nid); 301extern void kswapd_stop(int nid);
302 302
303#ifdef CONFIG_MMU
304/* linux/mm/shmem.c */
305extern int shmem_unuse(swp_entry_t entry, struct page *page);
306#endif /* CONFIG_MMU */
307
308#ifdef CONFIG_CGROUP_MEM_RES_CTLR
309extern void mem_cgroup_get_shmem_target(struct inode *inode, pgoff_t pgoff,
310 struct page **pagep, swp_entry_t *ent);
311#endif
312
313#ifdef CONFIG_SWAP 303#ifdef CONFIG_SWAP
314/* linux/mm/page_io.c */ 304/* linux/mm/page_io.c */
315extern int swap_readpage(struct page *); 305extern int swap_readpage(struct page *);
@@ -358,6 +348,7 @@ struct backing_dev_info;
358extern struct mm_struct *swap_token_mm; 348extern struct mm_struct *swap_token_mm;
359extern void grab_swap_token(struct mm_struct *); 349extern void grab_swap_token(struct mm_struct *);
360extern void __put_swap_token(struct mm_struct *); 350extern void __put_swap_token(struct mm_struct *);
351extern void disable_swap_token(struct mem_cgroup *memcg);
361 352
362static inline int has_swap_token(struct mm_struct *mm) 353static inline int has_swap_token(struct mm_struct *mm)
363{ 354{
@@ -370,11 +361,6 @@ static inline void put_swap_token(struct mm_struct *mm)
370 __put_swap_token(mm); 361 __put_swap_token(mm);
371} 362}
372 363
373static inline void disable_swap_token(void)
374{
375 put_swap_token(swap_token_mm);
376}
377
378#ifdef CONFIG_CGROUP_MEM_RES_CTLR 364#ifdef CONFIG_CGROUP_MEM_RES_CTLR
379extern void 365extern void
380mem_cgroup_uncharge_swapcache(struct page *page, swp_entry_t ent, bool swapout); 366mem_cgroup_uncharge_swapcache(struct page *page, swp_entry_t ent, bool swapout);
@@ -500,7 +486,7 @@ static inline int has_swap_token(struct mm_struct *mm)
500 return 0; 486 return 0;
501} 487}
502 488
503static inline void disable_swap_token(void) 489static inline void disable_swap_token(struct mem_cgroup *memcg)
504{ 490{
505} 491}
506 492