aboutsummaryrefslogtreecommitdiffstats
path: root/mm/shmem.c
diff options
context:
space:
mode:
Diffstat (limited to 'mm/shmem.c')
-rw-r--r--mm/shmem.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/mm/shmem.c b/mm/shmem.c
index 38bc3334f263..b14ff817d162 100644
--- a/mm/shmem.c
+++ b/mm/shmem.c
@@ -26,7 +26,6 @@
26#include <linux/config.h> 26#include <linux/config.h>
27#include <linux/module.h> 27#include <linux/module.h>
28#include <linux/init.h> 28#include <linux/init.h>
29#include <linux/devfs_fs_kernel.h>
30#include <linux/fs.h> 29#include <linux/fs.h>
31#include <linux/mm.h> 30#include <linux/mm.h>
32#include <linux/mman.h> 31#include <linux/mman.h>
@@ -174,7 +173,7 @@ static inline void shmem_unacct_blocks(unsigned long flags, long pages)
174} 173}
175 174
176static struct super_operations shmem_ops; 175static struct super_operations shmem_ops;
177static struct address_space_operations shmem_aops; 176static const struct address_space_operations shmem_aops;
178static struct file_operations shmem_file_operations; 177static struct file_operations shmem_file_operations;
179static struct inode_operations shmem_inode_operations; 178static struct inode_operations shmem_inode_operations;
180static struct inode_operations shmem_dir_inode_operations; 179static struct inode_operations shmem_dir_inode_operations;
@@ -2162,7 +2161,7 @@ static void destroy_inodecache(void)
2162 printk(KERN_INFO "shmem_inode_cache: not all structures were freed\n"); 2161 printk(KERN_INFO "shmem_inode_cache: not all structures were freed\n");
2163} 2162}
2164 2163
2165static struct address_space_operations shmem_aops = { 2164static const struct address_space_operations shmem_aops = {
2166 .writepage = shmem_writepage, 2165 .writepage = shmem_writepage,
2167 .set_page_dirty = __set_page_dirty_nobuffers, 2166 .set_page_dirty = __set_page_dirty_nobuffers,
2168#ifdef CONFIG_TMPFS 2167#ifdef CONFIG_TMPFS
@@ -2252,9 +2251,7 @@ static int __init init_tmpfs(void)
2252 printk(KERN_ERR "Could not register tmpfs\n"); 2251 printk(KERN_ERR "Could not register tmpfs\n");
2253 goto out2; 2252 goto out2;
2254 } 2253 }
2255#ifdef CONFIG_TMPFS 2254
2256 devfs_mk_dir("shm");
2257#endif
2258 shm_mnt = vfs_kern_mount(&tmpfs_fs_type, MS_NOUSER, 2255 shm_mnt = vfs_kern_mount(&tmpfs_fs_type, MS_NOUSER,
2259 tmpfs_fs_type.name, NULL); 2256 tmpfs_fs_type.name, NULL);
2260 if (IS_ERR(shm_mnt)) { 2257 if (IS_ERR(shm_mnt)) {