aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ramfs
diff options
context:
space:
mode:
authorSteven Whitehouse <swhiteho@redhat.com>2006-03-31 15:34:58 -0500
committerSteven Whitehouse <swhiteho@redhat.com>2006-03-31 15:34:58 -0500
commit86579dd06deecfa6ac88d5e84e4d63c397cd6f6d (patch)
treeb4475d3ccde53015ad84a06e4e55e64591171b75 /fs/ramfs
parent7ea9ea832212c4a755650f7c7cc1ff0b63292a41 (diff)
parenta0f067802576d4eb4c65d40b8ee7d6ea3c81dd61 (diff)
Merge branch 'master'
Diffstat (limited to 'fs/ramfs')
-rw-r--r--fs/ramfs/file-mmu.c13
-rw-r--r--fs/ramfs/file-nommu.c5
-rw-r--r--fs/ramfs/internal.h2
3 files changed, 4 insertions, 16 deletions
diff --git a/fs/ramfs/file-mmu.c b/fs/ramfs/file-mmu.c
index 2115383dcc8d..00a933eb820c 100644
--- a/fs/ramfs/file-mmu.c
+++ b/fs/ramfs/file-mmu.c
@@ -24,18 +24,7 @@
24 * caches is sufficient. 24 * caches is sufficient.
25 */ 25 */
26 26
27#include <linux/module.h>
28#include <linux/fs.h> 27#include <linux/fs.h>
29#include <linux/pagemap.h>
30#include <linux/highmem.h>
31#include <linux/init.h>
32#include <linux/string.h>
33#include <linux/smp_lock.h>
34#include <linux/backing-dev.h>
35#include <linux/ramfs.h>
36
37#include <asm/uaccess.h>
38#include "internal.h"
39 28
40struct address_space_operations ramfs_aops = { 29struct address_space_operations ramfs_aops = {
41 .readpage = simple_readpage, 30 .readpage = simple_readpage,
@@ -43,7 +32,7 @@ struct address_space_operations ramfs_aops = {
43 .commit_write = simple_commit_write 32 .commit_write = simple_commit_write
44}; 33};
45 34
46struct file_operations ramfs_file_operations = { 35const struct file_operations ramfs_file_operations = {
47 .read = generic_file_read, 36 .read = generic_file_read,
48 .write = generic_file_write, 37 .write = generic_file_write,
49 .mmap = generic_file_mmap, 38 .mmap = generic_file_mmap,
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
36struct file_operations ramfs_file_operations = { 36const 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++)
diff --git a/fs/ramfs/internal.h b/fs/ramfs/internal.h
index 272c8a7120b0..313237631b49 100644
--- a/fs/ramfs/internal.h
+++ b/fs/ramfs/internal.h
@@ -11,5 +11,5 @@
11 11
12 12
13extern struct address_space_operations ramfs_aops; 13extern struct address_space_operations ramfs_aops;
14extern struct file_operations ramfs_file_operations; 14extern const struct file_operations ramfs_file_operations;
15extern struct inode_operations ramfs_file_inode_operations; 15extern struct inode_operations ramfs_file_inode_operations;