aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--include/linux/shmem_fs.h17
-rw-r--r--include/linux/swap.h10
-rw-r--r--mm/memcontrol.c1
-rw-r--r--mm/swapfile.c2
4 files changed, 19 insertions, 11 deletions
diff --git a/include/linux/shmem_fs.h b/include/linux/shmem_fs.h
index 2b7fec840517..cae65dc42bcc 100644
--- a/include/linux/shmem_fs.h
+++ b/include/linux/shmem_fs.h
@@ -5,6 +5,13 @@
5#include <linux/mempolicy.h> 5#include <linux/mempolicy.h>
6#include <linux/percpu_counter.h> 6#include <linux/percpu_counter.h>
7 7
8struct page;
9struct file;
10struct inode;
11struct super_block;
12struct user_struct;
13struct vm_area_struct;
14
8/* inode in-kernel data */ 15/* inode in-kernel data */
9 16
10#define SHMEM_NR_DIRECT 16 17#define SHMEM_NR_DIRECT 16
@@ -45,7 +52,17 @@ static inline struct shmem_inode_info *SHMEM_I(struct inode *inode)
45 return container_of(inode, struct shmem_inode_info, vfs_inode); 52 return container_of(inode, struct shmem_inode_info, vfs_inode);
46} 53}
47 54
55/*
56 * Functions in mm/shmem.c called directly from elsewhere:
57 */
48extern int init_tmpfs(void); 58extern int init_tmpfs(void);
49extern int shmem_fill_super(struct super_block *sb, void *data, int silent); 59extern int shmem_fill_super(struct super_block *sb, void *data, int silent);
60extern struct file *shmem_file_setup(const char *name,
61 loff_t size, unsigned long flags);
62extern int shmem_zero_setup(struct vm_area_struct *);
63extern int shmem_lock(struct file *file, int lock, struct user_struct *user);
64extern int shmem_unuse(swp_entry_t entry, struct page *page);
65extern void mem_cgroup_get_shmem_target(struct inode *inode, pgoff_t pgoff,
66 struct page **pagep, swp_entry_t *ent);
50 67
51#endif 68#endif
diff --git a/include/linux/swap.h b/include/linux/swap.h
index e70564647039..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 *);
diff --git a/mm/memcontrol.c b/mm/memcontrol.c
index cf7d027a8844..ddffc74cdebe 100644
--- a/mm/memcontrol.c
+++ b/mm/memcontrol.c
@@ -35,6 +35,7 @@
35#include <linux/limits.h> 35#include <linux/limits.h>
36#include <linux/mutex.h> 36#include <linux/mutex.h>
37#include <linux/rbtree.h> 37#include <linux/rbtree.h>
38#include <linux/shmem_fs.h>
38#include <linux/slab.h> 39#include <linux/slab.h>
39#include <linux/swap.h> 40#include <linux/swap.h>
40#include <linux/swapops.h> 41#include <linux/swapops.h>
diff --git a/mm/swapfile.c b/mm/swapfile.c
index d537d29e9b7b..ff8dc1a18cb4 100644
--- a/mm/swapfile.c
+++ b/mm/swapfile.c
@@ -14,7 +14,7 @@
14#include <linux/vmalloc.h> 14#include <linux/vmalloc.h>
15#include <linux/pagemap.h> 15#include <linux/pagemap.h>
16#include <linux/namei.h> 16#include <linux/namei.h>
17#include <linux/shm.h> 17#include <linux/shmem_fs.h>
18#include <linux/blkdev.h> 18#include <linux/blkdev.h>
19#include <linux/random.h> 19#include <linux/random.h>
20#include <linux/writeback.h> 20#include <linux/writeback.h>