]> git.proxmox.com Git - mirror_ubuntu-zesty-kernel.git/blobdiff - fs/ramfs/file-nommu.c
mm: restore KERNEL_DS optimisations
[mirror_ubuntu-zesty-kernel.git] / fs / ramfs / file-nommu.c
index cad2b7ace63033bc4aa0e78393e07d3527f296c9..237fe8b8e819de469c6017f7ad5ddf9525ed0e94 100644 (file)
@@ -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;
 }