Skip to content

Commit

Permalink
Add VM_MIXEDMAP support to follow_pfn
Browse files Browse the repository at this point in the history
VM_MIXEDMAPs which are created by mmaping files in DAX capable
filesystem do have valid PFNs. However, there is no obvious way to get
the PFN from a VMA because follow_pfn is limitted to VMAs with the
VM_IO or VM_PFNMAP flags. If we add VM_MIXEDMAP to this check we can
get the PFN in the same way we do for VM_PFNMAPs.
  • Loading branch information
lsgunth committed Mar 17, 2015
1 parent bf6fac5 commit e50a659
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion mm/memory.c
Original file line number Diff line number Diff line change
Expand Up @@ -3533,7 +3533,7 @@ int follow_pfn(struct vm_area_struct *vma, unsigned long address,
spinlock_t *ptl;
pte_t *ptep;

if (!(vma->vm_flags & (VM_IO | VM_PFNMAP)))
if (!(vma->vm_flags & (VM_IO | VM_PFNMAP | VM_MIXEDMAP)))
return ret;

ret = follow_pte(vma->vm_mm, address, &ptep, &ptl);
Expand Down

0 comments on commit e50a659

Please sign in to comment.