git://git.onelab.eu
/
linux-2.6.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
linux 2.6.16.38 w/ vs2.0.3-rc1
[linux-2.6.git]
/
fs
/
ramfs
/
file-nommu.c
diff --git
a/fs/ramfs/file-nommu.c
b/fs/ramfs/file-nommu.c
index
677139b
..
3f810ac
100644
(file)
--- a/
fs/ramfs/file-nommu.c
+++ b/
fs/ramfs/file-nommu.c
@@
-27,13
+27,13
@@
static int ramfs_nommu_setattr(struct dentry *, struct iattr *);
static int ramfs_nommu_setattr(struct dentry *, struct iattr *);
-
const
struct address_space_operations ramfs_aops = {
+struct address_space_operations ramfs_aops = {
.readpage = simple_readpage,
.prepare_write = simple_prepare_write,
.commit_write = simple_commit_write
};
.readpage = simple_readpage,
.prepare_write = simple_prepare_write,
.commit_write = simple_commit_write
};
-
const
struct file_operations ramfs_file_operations = {
+struct file_operations ramfs_file_operations = {
.mmap = ramfs_nommu_mmap,
.get_unmapped_area = ramfs_nommu_get_unmapped_area,
.read = generic_file_read,
.mmap = ramfs_nommu_mmap,
.get_unmapped_area = ramfs_nommu_get_unmapped_area,
.read = generic_file_read,
@@
-87,7
+87,8
@@
static int ramfs_nommu_expand_for_mapping(struct inode *inode, size_t newsize)
xpages = 1UL << order;
npages = (newsize + PAGE_SIZE - 1) >> PAGE_SHIFT;
xpages = 1UL << order;
npages = (newsize + PAGE_SIZE - 1) >> PAGE_SHIFT;
- split_page(pages, order);
+ for (loop = 0; loop < npages; loop++)
+ set_page_count(pages + loop, 1);
/* trim off any pages we don't actually require */
for (loop = npages; loop < xpages; loop++)
/* trim off any pages we don't actually require */
for (loop = npages; loop < xpages; loop++)
@@
-283,9
+284,9
@@
unsigned long ramfs_nommu_get_unmapped_area(struct file *file,
/*****************************************************************************/
/*
/*****************************************************************************/
/*
- * set up a mapping
for shared memory segments
+ * set up a mapping
*/
int ramfs_nommu_mmap(struct file *file, struct vm_area_struct *vma)
{
*/
int ramfs_nommu_mmap(struct file *file, struct vm_area_struct *vma)
{
- return
vma->vm_flags & VM_SHARED ? 0 : -ENOSYS
;
+ return
0
;
}
}