summaryrefslogtreecommitdiffstats
path: root/mm/memory.c
diff options
context:
space:
mode:
Diffstat (limited to 'mm/memory.c')
-rw-r--r--mm/memory.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/mm/memory.c b/mm/memory.c
index 78b81e8984df..7ba9cc58dddd 100644
--- a/mm/memory.c
+++ b/mm/memory.c
@@ -2273,16 +2273,11 @@ static int wp_pfn_shared(struct vm_fault *vmf, pte_t orig_pte)
2273 struct vm_area_struct *vma = vmf->vma; 2273 struct vm_area_struct *vma = vmf->vma;
2274 2274
2275 if (vma->vm_ops && vma->vm_ops->pfn_mkwrite) { 2275 if (vma->vm_ops && vma->vm_ops->pfn_mkwrite) {
2276 struct vm_fault vmf2 = {
2277 .page = NULL,
2278 .pgoff = vmf->pgoff,
2279 .address = vmf->address,
2280 .flags = FAULT_FLAG_WRITE | FAULT_FLAG_MKWRITE,
2281 };
2282 int ret; 2276 int ret;
2283 2277
2284 pte_unmap_unlock(vmf->pte, vmf->ptl); 2278 pte_unmap_unlock(vmf->pte, vmf->ptl);
2285 ret = vma->vm_ops->pfn_mkwrite(vma, &vmf2); 2279 vmf->flags |= FAULT_FLAG_MKWRITE;
2280 ret = vma->vm_ops->pfn_mkwrite(vma, vmf);
2286 if (ret & VM_FAULT_ERROR) 2281 if (ret & VM_FAULT_ERROR)
2287 return ret; 2282 return ret;
2288 vmf->pte = pte_offset_map_lock(vma->vm_mm, vmf->pmd, 2283 vmf->pte = pte_offset_map_lock(vma->vm_mm, vmf->pmd,