aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/shmem_fs.h
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@suse.de>2011-08-08 00:08:28 -0400
committerGreg Kroah-Hartman <gregkh@suse.de>2011-08-08 00:08:41 -0400
commitb6741d1fe947f829bd4303397fd888e1d4b66bae (patch)
treea41c8cf58ddfd82d3083b666479a82df018297f7 /include/linux/shmem_fs.h
parentacab460b0f618e1e9663eea8c52ad5edd552ed1d (diff)
parent322a8b034003c0d46d39af85bf24fee27b902f48 (diff)
Merge 3.1-rc1 into usb-linus
Gives us a good starting point to base patches off of. Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'include/linux/shmem_fs.h')
-rw-r--r--include/linux/shmem_fs.h17
1 files changed, 4 insertions, 13 deletions
diff --git a/include/linux/shmem_fs.h b/include/linux/shmem_fs.h
index aa08fa8fd79..9291ac3cc62 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
15struct shmem_inode_info { 11struct 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 */
52extern int init_tmpfs(void); 45extern int shmem_init(void);
53extern int shmem_fill_super(struct super_block *sb, void *data, int silent); 46extern int shmem_fill_super(struct super_block *sb, void *data, int silent);
54extern struct file *shmem_file_setup(const char *name, 47extern 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);
60extern void shmem_truncate_range(struct inode *inode, loff_t start, loff_t end); 53extern void shmem_truncate_range(struct inode *inode, loff_t start, loff_t end);
61extern int shmem_unuse(swp_entry_t entry, struct page *page); 54extern int shmem_unuse(swp_entry_t entry, struct page *page);
62extern void mem_cgroup_get_shmem_target(struct inode *inode, pgoff_t pgoff,
63 struct page **pagep, swp_entry_t *ent);
64 55
65static inline struct page *shmem_read_mapping_page( 56static inline struct page *shmem_read_mapping_page(
66 struct address_space *mapping, pgoff_t index) 57 struct address_space *mapping, pgoff_t index)