diff options
-rw-r--r-- | fs/hugetlbfs/inode.c | 19 | ||||
-rw-r--r-- | include/linux/hugetlb.h | 25 |
2 files changed, 19 insertions, 25 deletions
diff --git a/fs/hugetlbfs/inode.c b/fs/hugetlbfs/inode.c index 19654cfe780b..4fbd9fccd550 100644 --- a/fs/hugetlbfs/inode.c +++ b/fs/hugetlbfs/inode.c | |||
@@ -41,6 +41,25 @@ const struct file_operations hugetlbfs_file_operations; | |||
41 | static const struct inode_operations hugetlbfs_dir_inode_operations; | 41 | static const struct inode_operations hugetlbfs_dir_inode_operations; |
42 | static const struct inode_operations hugetlbfs_inode_operations; | 42 | static const struct inode_operations hugetlbfs_inode_operations; |
43 | 43 | ||
44 | struct hugetlbfs_config { | ||
45 | uid_t uid; | ||
46 | gid_t gid; | ||
47 | umode_t mode; | ||
48 | long nr_blocks; | ||
49 | long nr_inodes; | ||
50 | struct hstate *hstate; | ||
51 | }; | ||
52 | |||
53 | struct hugetlbfs_inode_info { | ||
54 | struct shared_policy policy; | ||
55 | struct inode vfs_inode; | ||
56 | }; | ||
57 | |||
58 | static inline struct hugetlbfs_inode_info *HUGETLBFS_I(struct inode *inode) | ||
59 | { | ||
60 | return container_of(inode, struct hugetlbfs_inode_info, vfs_inode); | ||
61 | } | ||
62 | |||
44 | static struct backing_dev_info hugetlbfs_backing_dev_info = { | 63 | static struct backing_dev_info hugetlbfs_backing_dev_info = { |
45 | .name = "hugetlbfs", | 64 | .name = "hugetlbfs", |
46 | .ra_pages = 0, /* No readahead */ | 65 | .ra_pages = 0, /* No readahead */ |
diff --git a/include/linux/hugetlb.h b/include/linux/hugetlb.h index d9d6c868b86b..7adc4923e7ac 100644 --- a/include/linux/hugetlb.h +++ b/include/linux/hugetlb.h | |||
@@ -128,15 +128,6 @@ enum { | |||
128 | }; | 128 | }; |
129 | 129 | ||
130 | #ifdef CONFIG_HUGETLBFS | 130 | #ifdef CONFIG_HUGETLBFS |
131 | struct hugetlbfs_config { | ||
132 | uid_t uid; | ||
133 | gid_t gid; | ||
134 | umode_t mode; | ||
135 | long nr_blocks; | ||
136 | long nr_inodes; | ||
137 | struct hstate *hstate; | ||
138 | }; | ||
139 | |||
140 | struct hugetlbfs_sb_info { | 131 | struct hugetlbfs_sb_info { |
141 | long max_blocks; /* blocks allowed */ | 132 | long max_blocks; /* blocks allowed */ |
142 | long free_blocks; /* blocks free */ | 133 | long free_blocks; /* blocks free */ |
@@ -146,17 +137,6 @@ struct hugetlbfs_sb_info { | |||
146 | struct hstate *hstate; | 137 | struct hstate *hstate; |
147 | }; | 138 | }; |
148 | 139 | ||
149 | |||
150 | struct hugetlbfs_inode_info { | ||
151 | struct shared_policy policy; | ||
152 | struct inode vfs_inode; | ||
153 | }; | ||
154 | |||
155 | static inline struct hugetlbfs_inode_info *HUGETLBFS_I(struct inode *inode) | ||
156 | { | ||
157 | return container_of(inode, struct hugetlbfs_inode_info, vfs_inode); | ||
158 | } | ||
159 | |||
160 | static inline struct hugetlbfs_sb_info *HUGETLBFS_SB(struct super_block *sb) | 140 | static inline struct hugetlbfs_sb_info *HUGETLBFS_SB(struct super_block *sb) |
161 | { | 141 | { |
162 | return sb->s_fs_info; | 142 | return sb->s_fs_info; |
@@ -179,14 +159,9 @@ static inline int is_file_hugepages(struct file *file) | |||
179 | return 0; | 159 | return 0; |
180 | } | 160 | } |
181 | 161 | ||
182 | static inline void set_file_hugepages(struct file *file) | ||
183 | { | ||
184 | file->f_op = &hugetlbfs_file_operations; | ||
185 | } | ||
186 | #else /* !CONFIG_HUGETLBFS */ | 162 | #else /* !CONFIG_HUGETLBFS */ |
187 | 163 | ||
188 | #define is_file_hugepages(file) 0 | 164 | #define is_file_hugepages(file) 0 |
189 | #define set_file_hugepages(file) BUG() | ||
190 | static inline struct file *hugetlb_file_setup(const char *name, size_t size, | 165 | static inline struct file *hugetlb_file_setup(const char *name, size_t size, |
191 | vm_flags_t acctflag, struct user_struct **user, int creat_flags) | 166 | vm_flags_t acctflag, struct user_struct **user, int creat_flags) |
192 | { | 167 | { |