aboutsummaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
Diffstat (limited to 'fs')
-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 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 */
296int ramfs_nommu_mmap(struct file *file, struct vm_area_struct *vma) 296int 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}