aboutsummaryrefslogtreecommitdiff
path: root/fs/ramfs/file-nommu.c
diff options
context:
space:
mode:
authorDavid Woodhouse <dwmw2@infradead.org>2007-08-01 11:23:57 +0100
committerDavid Woodhouse <dwmw2@infradead.org>2007-08-01 11:23:57 +0100
commit440fdb53b4ae58602711b5b8c3a139ace2404dbb (patch)
treec6fb88d6ad537ec53aeecadc75a61ab6147d4c9c /fs/ramfs/file-nommu.c
parent8b2b403ce0f1a816b7a6a4f47c8798003b26c07a (diff)
parent8d4fbcfbe0a4bfc73e7f0297c59ae514e1f1436f (diff)
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6
Diffstat (limited to 'fs/ramfs/file-nommu.c')
-rw-r--r--fs/ramfs/file-nommu.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/fs/ramfs/file-nommu.c b/fs/ramfs/file-nommu.c
index cad2b7ace63..237fe8b8e81 100644
--- a/fs/ramfs/file-nommu.c
+++ b/fs/ramfs/file-nommu.c
@@ -295,5 +295,10 @@ unsigned long ramfs_nommu_get_unmapped_area(struct file *file,
*/
int ramfs_nommu_mmap(struct file *file, struct vm_area_struct *vma)
{
- return vma->vm_flags & VM_SHARED ? 0 : -ENOSYS;
+ if (!(vma->vm_flags & VM_SHARED))
+ return -ENOSYS;
+
+ file_accessed(file);
+ vma->vm_ops = &generic_file_vm_ops;
+ return 0;
}