diff options
Diffstat (limited to 'fs')
-rw-r--r-- | fs/dax.c | 9 |
1 files changed, 8 insertions, 1 deletions
@@ -1056,6 +1056,7 @@ EXPORT_SYMBOL_GPL(dax_pmd_fault); | |||
1056 | int dax_pfn_mkwrite(struct vm_area_struct *vma, struct vm_fault *vmf) | 1056 | int dax_pfn_mkwrite(struct vm_area_struct *vma, struct vm_fault *vmf) |
1057 | { | 1057 | { |
1058 | struct file *file = vma->vm_file; | 1058 | struct file *file = vma->vm_file; |
1059 | int error; | ||
1059 | 1060 | ||
1060 | /* | 1061 | /* |
1061 | * We pass NO_SECTOR to dax_radix_entry() because we expect that a | 1062 | * We pass NO_SECTOR to dax_radix_entry() because we expect that a |
@@ -1065,7 +1066,13 @@ int dax_pfn_mkwrite(struct vm_area_struct *vma, struct vm_fault *vmf) | |||
1065 | * saves us from having to make a call to get_block() here to look | 1066 | * saves us from having to make a call to get_block() here to look |
1066 | * up the sector. | 1067 | * up the sector. |
1067 | */ | 1068 | */ |
1068 | dax_radix_entry(file->f_mapping, vmf->pgoff, NO_SECTOR, false, true); | 1069 | error = dax_radix_entry(file->f_mapping, vmf->pgoff, NO_SECTOR, false, |
1070 | true); | ||
1071 | |||
1072 | if (error == -ENOMEM) | ||
1073 | return VM_FAULT_OOM; | ||
1074 | if (error) | ||
1075 | return VM_FAULT_SIGBUS; | ||
1069 | return VM_FAULT_NOPAGE; | 1076 | return VM_FAULT_NOPAGE; |
1070 | } | 1077 | } |
1071 | EXPORT_SYMBOL_GPL(dax_pfn_mkwrite); | 1078 | EXPORT_SYMBOL_GPL(dax_pfn_mkwrite); |