Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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>

authored by

Hugh Dickins and committed by
Linus Torvalds
072441e2 5b8ba101

+19 -11
+17
include/linux/shmem_fs.h
··· 5 5 #include <linux/mempolicy.h> 6 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 15 /* inode in-kernel data */ 9 16 10 17 #define SHMEM_NR_DIRECT 16 ··· 52 45 return container_of(inode, struct shmem_inode_info, vfs_inode); 53 46 } 54 47 48 + /* 49 + * Functions in mm/shmem.c called directly from elsewhere: 50 + */ 55 51 extern int init_tmpfs(void); 56 52 extern int shmem_fill_super(struct super_block *sb, void *data, int silent); 53 + extern struct file *shmem_file_setup(const char *name, 54 + loff_t size, unsigned long flags); 55 + extern int shmem_zero_setup(struct vm_area_struct *); 56 + extern int shmem_lock(struct file *file, int lock, struct user_struct *user); 57 + extern int shmem_unuse(swp_entry_t entry, struct page *page); 58 + extern void mem_cgroup_get_shmem_target(struct inode *inode, pgoff_t pgoff, 59 + struct page **pagep, swp_entry_t *ent); 57 60 58 61 #endif
-10
include/linux/swap.h
··· 300 300 extern int kswapd_run(int nid); 301 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 303 #ifdef CONFIG_SWAP 314 304 /* linux/mm/page_io.c */ 315 305 extern int swap_readpage(struct page *);
+1
mm/memcontrol.c
··· 35 35 #include <linux/limits.h> 36 36 #include <linux/mutex.h> 37 37 #include <linux/rbtree.h> 38 + #include <linux/shmem_fs.h> 38 39 #include <linux/slab.h> 39 40 #include <linux/swap.h> 40 41 #include <linux/swapops.h>
+1 -1
mm/swapfile.c
··· 14 14 #include <linux/vmalloc.h> 15 15 #include <linux/pagemap.h> 16 16 #include <linux/namei.h> 17 - #include <linux/shm.h> 17 + #include <linux/shmem_fs.h> 18 18 #include <linux/blkdev.h> 19 19 #include <linux/random.h> 20 20 #include <linux/writeback.h>