diff options
author | Hugh Dickins <hughd@google.com> | 2011-06-27 19:18:02 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2011-06-27 21:00:12 -0400 |
commit | 072441e21ddcd1140606b7d4ef6eab579a86b0b3 (patch) | |
tree | 6f059ad83c09dfbeb1def29e805839db3e5bf85f /include | |
parent | 5b8ba10198a109f8a02380648c5d29000caa9c55 (diff) |
mm: move shmem prototypes to shmem_fs.h
Before adding any more global entry points into shmem.c, gather such
prototypes into shmem_fs.h. Remove mm's own declarations from swap.h,
but for now leave the ones in mm.h: because shmem_file_setup() and
shmem_zero_setup() are called from various places, and we should not
force other subsystems to update immediately.
Signed-off-by: Hugh Dickins <hughd@google.com>
Cc: Christoph Hellwig <hch@infradead.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/shmem_fs.h | 17 | ||||
-rw-r--r-- | include/linux/swap.h | 10 |
2 files changed, 17 insertions, 10 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 | ||
8 | struct page; | ||
9 | struct file; | ||
10 | struct inode; | ||
11 | struct super_block; | ||
12 | struct user_struct; | ||
13 | struct 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 | */ | ||
48 | extern int init_tmpfs(void); | 58 | extern int init_tmpfs(void); |
49 | extern int shmem_fill_super(struct super_block *sb, void *data, int silent); | 59 | extern int shmem_fill_super(struct super_block *sb, void *data, int silent); |
60 | extern struct file *shmem_file_setup(const char *name, | ||
61 | loff_t size, unsigned long flags); | ||
62 | extern int shmem_zero_setup(struct vm_area_struct *); | ||
63 | extern int shmem_lock(struct file *file, int lock, struct user_struct *user); | ||
64 | extern int shmem_unuse(swp_entry_t entry, struct page *page); | ||
65 | extern 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) | |||
300 | extern int kswapd_run(int nid); | 300 | extern int kswapd_run(int nid); |
301 | extern void kswapd_stop(int nid); | 301 | extern void kswapd_stop(int nid); |
302 | 302 | ||
303 | #ifdef CONFIG_MMU | ||
304 | /* linux/mm/shmem.c */ | ||
305 | extern int shmem_unuse(swp_entry_t entry, struct page *page); | ||
306 | #endif /* CONFIG_MMU */ | ||
307 | |||
308 | #ifdef CONFIG_CGROUP_MEM_RES_CTLR | ||
309 | extern 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 */ |
315 | extern int swap_readpage(struct page *); | 305 | extern int swap_readpage(struct page *); |