mm/nommu: factor out check for NOMMU shared mappings into is_nommu_shared_mapping()
[linux-2.6-microblaze.git] / fs / romfs / mmap-nommu.c
index 2c4a231..4578dc4 100644 (file)
@@ -63,7 +63,7 @@ static unsigned long romfs_get_unmapped_area(struct file *file,
  */
 static int romfs_mmap(struct file *file, struct vm_area_struct *vma)
 {
-       return vma->vm_flags & (VM_SHARED | VM_MAYSHARE) ? 0 : -ENOSYS;
+       return is_nommu_shared_mapping(vma->vm_flags) ? 0 : -ENOSYS;
 }
 
 static unsigned romfs_mmap_capabilities(struct file *file)