git.openpandora.org
/
pandora-kernel.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch 'for-linus' of master.kernel.org:/home/rmk/linux-2.6-arm
[pandora-kernel.git]
/
fs
/
ramfs
/
file-nommu.c
diff --git
a/fs/ramfs/file-nommu.c
b/fs/ramfs/file-nommu.c
index
99fffc9
..
e9d6c47
100644
(file)
--- a/
fs/ramfs/file-nommu.c
+++ b/
fs/ramfs/file-nommu.c
@@
-11,6
+11,7
@@
#include <linux/module.h>
#include <linux/fs.h>
#include <linux/module.h>
#include <linux/fs.h>
+#include <linux/mm.h>
#include <linux/pagemap.h>
#include <linux/highmem.h>
#include <linux/init.h>
#include <linux/pagemap.h>
#include <linux/highmem.h>
#include <linux/init.h>
@@
-30,14
+31,17
@@
static int ramfs_nommu_setattr(struct dentry *, struct iattr *);
const struct address_space_operations ramfs_aops = {
.readpage = simple_readpage,
.prepare_write = simple_prepare_write,
const struct address_space_operations ramfs_aops = {
.readpage = simple_readpage,
.prepare_write = simple_prepare_write,
- .commit_write = simple_commit_write
+ .commit_write = simple_commit_write,
+ .set_page_dirty = __set_page_dirty_nobuffers,
};
const struct file_operations ramfs_file_operations = {
.mmap = ramfs_nommu_mmap,
.get_unmapped_area = ramfs_nommu_get_unmapped_area,
};
const struct file_operations ramfs_file_operations = {
.mmap = ramfs_nommu_mmap,
.get_unmapped_area = ramfs_nommu_get_unmapped_area,
- .read = generic_file_read,
- .write = generic_file_write,
+ .read = do_sync_read,
+ .aio_read = generic_file_aio_read,
+ .write = do_sync_write,
+ .aio_write = generic_file_aio_write,
.fsync = simple_sync_file,
.sendfile = generic_file_sendfile,
.llseek = generic_file_llseek,
.fsync = simple_sync_file,
.sendfile = generic_file_sendfile,
.llseek = generic_file_llseek,
@@
-230,7
+234,7
@@
unsigned long ramfs_nommu_get_unmapped_area(struct file *file,
unsigned long pgoff, unsigned long flags)
{
unsigned long maxpages, lpages, nr, loop, ret;
unsigned long pgoff, unsigned long flags)
{
unsigned long maxpages, lpages, nr, loop, ret;
- struct inode *inode = file->f_dentry->d_inode;
+ struct inode *inode = file->f_
path.
dentry->d_inode;
struct page **pages = NULL, **ptr, *page;
loff_t isize;
struct page **pages = NULL, **ptr, *page;
loff_t isize;
@@
-283,9
+287,9
@@
unsigned long ramfs_nommu_get_unmapped_area(struct file *file,
/*****************************************************************************/
/*
/*****************************************************************************/
/*
- * set up a mapping
+ * set up a mapping
for shared memory segments
*/
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
0
;
+ return
vma->vm_flags & VM_SHARED ? 0 : -ENOSYS
;
}
}