diff options
Diffstat (limited to 'fs/ramfs')
-rw-r--r-- | fs/ramfs/file-nommu.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/fs/ramfs/file-nommu.c b/fs/ramfs/file-nommu.c index cad2b7ace630..237fe8b8e819 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, | |||
295 | */ | 295 | */ |
296 | int ramfs_nommu_mmap(struct file *file, struct vm_area_struct *vma) | 296 | int ramfs_nommu_mmap(struct file *file, struct vm_area_struct *vma) |
297 | { | 297 | { |
298 | return vma->vm_flags & VM_SHARED ? 0 : -ENOSYS; | 298 | if (!(vma->vm_flags & VM_SHARED)) |
299 | return -ENOSYS; | ||
300 | |||
301 | file_accessed(file); | ||
302 | vma->vm_ops = &generic_file_vm_ops; | ||
303 | return 0; | ||
299 | } | 304 | } |