diff options
Diffstat (limited to 'fs/ramfs/inode.c')
-rw-r--r-- | fs/ramfs/inode.c | 21 |
1 files changed, 1 insertions, 20 deletions
diff --git a/fs/ramfs/inode.c b/fs/ramfs/inode.c index d365b1c4eb3c..889d558b4e05 100644 --- a/fs/ramfs/inode.c +++ b/fs/ramfs/inode.c | |||
@@ -50,14 +50,6 @@ static const struct address_space_operations ramfs_aops = { | |||
50 | .set_page_dirty = __set_page_dirty_no_writeback, | 50 | .set_page_dirty = __set_page_dirty_no_writeback, |
51 | }; | 51 | }; |
52 | 52 | ||
53 | static struct backing_dev_info ramfs_backing_dev_info = { | ||
54 | .name = "ramfs", | ||
55 | .ra_pages = 0, /* No readahead */ | ||
56 | .capabilities = BDI_CAP_NO_ACCT_AND_WRITEBACK | | ||
57 | BDI_CAP_MAP_DIRECT | BDI_CAP_MAP_COPY | | ||
58 | BDI_CAP_READ_MAP | BDI_CAP_WRITE_MAP | BDI_CAP_EXEC_MAP, | ||
59 | }; | ||
60 | |||
61 | struct inode *ramfs_get_inode(struct super_block *sb, | 53 | struct inode *ramfs_get_inode(struct super_block *sb, |
62 | const struct inode *dir, umode_t mode, dev_t dev) | 54 | const struct inode *dir, umode_t mode, dev_t dev) |
63 | { | 55 | { |
@@ -67,7 +59,6 @@ struct inode *ramfs_get_inode(struct super_block *sb, | |||
67 | inode->i_ino = get_next_ino(); | 59 | inode->i_ino = get_next_ino(); |
68 | inode_init_owner(inode, dir, mode); | 60 | inode_init_owner(inode, dir, mode); |
69 | inode->i_mapping->a_ops = &ramfs_aops; | 61 | inode->i_mapping->a_ops = &ramfs_aops; |
70 | inode->i_mapping->backing_dev_info = &ramfs_backing_dev_info; | ||
71 | mapping_set_gfp_mask(inode->i_mapping, GFP_HIGHUSER); | 62 | mapping_set_gfp_mask(inode->i_mapping, GFP_HIGHUSER); |
72 | mapping_set_unevictable(inode->i_mapping); | 63 | mapping_set_unevictable(inode->i_mapping); |
73 | inode->i_atime = inode->i_mtime = inode->i_ctime = CURRENT_TIME; | 64 | inode->i_atime = inode->i_mtime = inode->i_ctime = CURRENT_TIME; |
@@ -267,19 +258,9 @@ static struct file_system_type ramfs_fs_type = { | |||
267 | int __init init_ramfs_fs(void) | 258 | int __init init_ramfs_fs(void) |
268 | { | 259 | { |
269 | static unsigned long once; | 260 | static unsigned long once; |
270 | int err; | ||
271 | 261 | ||
272 | if (test_and_set_bit(0, &once)) | 262 | if (test_and_set_bit(0, &once)) |
273 | return 0; | 263 | return 0; |
274 | 264 | return register_filesystem(&ramfs_fs_type); | |
275 | err = bdi_init(&ramfs_backing_dev_info); | ||
276 | if (err) | ||
277 | return err; | ||
278 | |||
279 | err = register_filesystem(&ramfs_fs_type); | ||
280 | if (err) | ||
281 | bdi_destroy(&ramfs_backing_dev_info); | ||
282 | |||
283 | return err; | ||
284 | } | 265 | } |
285 | fs_initcall(init_ramfs_fs); | 266 | fs_initcall(init_ramfs_fs); |