summaryrefslogtreecommitdiff
path: root/fs/cramfs
diff options
context:
space:
mode:
Diffstat (limited to 'fs/cramfs')
-rw-r--r--fs/cramfs/inode.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/fs/cramfs/inode.c b/fs/cramfs/inode.c
index 0fb6e28e6c13..9352487bd0fc 100644
--- a/fs/cramfs/inode.c
+++ b/fs/cramfs/inode.c
@@ -419,9 +419,12 @@ static int cramfs_physmem_mmap(struct file *file, struct vm_area_struct *vma)
int i;
vma->vm_flags |= VM_MIXEDMAP;
for (i = 0; i < pages && !ret; i++) {
+ vm_fault_t vmf;
unsigned long off = i * PAGE_SIZE;
pfn_t pfn = phys_to_pfn_t(address + off, PFN_DEV);
- ret = vm_insert_mixed(vma, vma->vm_start + off, pfn);
+ vmf = vmf_insert_mixed(vma, vma->vm_start + off, pfn);
+ if (vmf & VM_FAULT_ERROR)
+ ret = vm_fault_to_errno(vmf, 0);
}
}