diff options
Diffstat (limited to 'fs/ramfs/file-nommu.c')
-rw-r--r-- | fs/ramfs/file-nommu.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/fs/ramfs/file-nommu.c b/fs/ramfs/file-nommu.c index 3f810acd0bfa..f443a84b98a5 100644 --- a/fs/ramfs/file-nommu.c +++ b/fs/ramfs/file-nommu.c | |||
@@ -33,7 +33,7 @@ struct address_space_operations ramfs_aops = { | |||
33 | .commit_write = simple_commit_write | 33 | .commit_write = simple_commit_write |
34 | }; | 34 | }; |
35 | 35 | ||
36 | struct file_operations ramfs_file_operations = { | 36 | const struct file_operations ramfs_file_operations = { |
37 | .mmap = ramfs_nommu_mmap, | 37 | .mmap = ramfs_nommu_mmap, |
38 | .get_unmapped_area = ramfs_nommu_get_unmapped_area, | 38 | .get_unmapped_area = ramfs_nommu_get_unmapped_area, |
39 | .read = generic_file_read, | 39 | .read = generic_file_read, |
@@ -87,8 +87,7 @@ static int ramfs_nommu_expand_for_mapping(struct inode *inode, size_t newsize) | |||
87 | xpages = 1UL << order; | 87 | xpages = 1UL << order; |
88 | npages = (newsize + PAGE_SIZE - 1) >> PAGE_SHIFT; | 88 | npages = (newsize + PAGE_SIZE - 1) >> PAGE_SHIFT; |
89 | 89 | ||
90 | for (loop = 0; loop < npages; loop++) | 90 | split_page(pages, order); |
91 | set_page_count(pages + loop, 1); | ||
92 | 91 | ||
93 | /* trim off any pages we don't actually require */ | 92 | /* trim off any pages we don't actually require */ |
94 | for (loop = npages; loop < xpages; loop++) | 93 | for (loop = npages; loop < xpages; loop++) |