diff options
Diffstat (limited to 'include/linux/shmem_fs.h')
-rw-r--r-- | include/linux/shmem_fs.h | 17 |
1 files changed, 4 insertions, 13 deletions
diff --git a/include/linux/shmem_fs.h b/include/linux/shmem_fs.h index aa08fa8fd79b..9291ac3cc627 100644 --- a/include/linux/shmem_fs.h +++ b/include/linux/shmem_fs.h | |||
@@ -8,22 +8,15 @@ | |||
8 | 8 | ||
9 | /* inode in-kernel data */ | 9 | /* inode in-kernel data */ |
10 | 10 | ||
11 | #define SHMEM_NR_DIRECT 16 | ||
12 | |||
13 | #define SHMEM_SYMLINK_INLINE_LEN (SHMEM_NR_DIRECT * sizeof(swp_entry_t)) | ||
14 | |||
15 | struct shmem_inode_info { | 11 | struct shmem_inode_info { |
16 | spinlock_t lock; | 12 | spinlock_t lock; |
17 | unsigned long flags; | 13 | unsigned long flags; |
18 | unsigned long alloced; /* data pages alloced to file */ | 14 | unsigned long alloced; /* data pages alloced to file */ |
19 | unsigned long swapped; /* subtotal assigned to swap */ | ||
20 | unsigned long next_index; /* highest alloced index + 1 */ | ||
21 | struct shared_policy policy; /* NUMA memory alloc policy */ | ||
22 | struct page *i_indirect; /* top indirect blocks page */ | ||
23 | union { | 15 | union { |
24 | swp_entry_t i_direct[SHMEM_NR_DIRECT]; /* first blocks */ | 16 | unsigned long swapped; /* subtotal assigned to swap */ |
25 | char inline_symlink[SHMEM_SYMLINK_INLINE_LEN]; | 17 | char *symlink; /* unswappable short symlink */ |
26 | }; | 18 | }; |
19 | struct shared_policy policy; /* NUMA memory alloc policy */ | ||
27 | struct list_head swaplist; /* chain of maybes on swap */ | 20 | struct list_head swaplist; /* chain of maybes on swap */ |
28 | struct list_head xattr_list; /* list of shmem_xattr */ | 21 | struct list_head xattr_list; /* list of shmem_xattr */ |
29 | struct inode vfs_inode; | 22 | struct inode vfs_inode; |
@@ -49,7 +42,7 @@ static inline struct shmem_inode_info *SHMEM_I(struct inode *inode) | |||
49 | /* | 42 | /* |
50 | * Functions in mm/shmem.c called directly from elsewhere: | 43 | * Functions in mm/shmem.c called directly from elsewhere: |
51 | */ | 44 | */ |
52 | extern int init_tmpfs(void); | 45 | extern int shmem_init(void); |
53 | extern int shmem_fill_super(struct super_block *sb, void *data, int silent); | 46 | extern int shmem_fill_super(struct super_block *sb, void *data, int silent); |
54 | extern struct file *shmem_file_setup(const char *name, | 47 | extern struct file *shmem_file_setup(const char *name, |
55 | loff_t size, unsigned long flags); | 48 | loff_t size, unsigned long flags); |
@@ -59,8 +52,6 @@ extern struct page *shmem_read_mapping_page_gfp(struct address_space *mapping, | |||
59 | pgoff_t index, gfp_t gfp_mask); | 52 | pgoff_t index, gfp_t gfp_mask); |
60 | extern void shmem_truncate_range(struct inode *inode, loff_t start, loff_t end); | 53 | extern void shmem_truncate_range(struct inode *inode, loff_t start, loff_t end); |
61 | extern int shmem_unuse(swp_entry_t entry, struct page *page); | 54 | extern int shmem_unuse(swp_entry_t entry, struct page *page); |
62 | extern void mem_cgroup_get_shmem_target(struct inode *inode, pgoff_t pgoff, | ||
63 | struct page **pagep, swp_entry_t *ent); | ||
64 | 55 | ||
65 | static inline struct page *shmem_read_mapping_page( | 56 | static inline struct page *shmem_read_mapping_page( |
66 | struct address_space *mapping, pgoff_t index) | 57 | struct address_space *mapping, pgoff_t index) |