lkml.org 
[lkml]   [2021]   [May]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH v2 11/22] vfio: Use vma_lookup() instead of find_vma_intersection()
    Date
    vma_lookup() finds the vma of a specific address with a cleaner
    interface and is more readable.

    Signed-off-by: Liam R. Howlett <Liam.Howlett@Oracle.com>
    Reviewed-by: Laurent Dufour <ldufour@linux.ibm.com>
    Acked-by: David Hildenbrand <david@redhat.com>
    Acked-by: Davidlohr Bueso <dbueso@suse.de>
    ---
    drivers/vfio/vfio_iommu_type1.c | 2 +-
    1 file changed, 1 insertion(+), 1 deletion(-)

    diff --git a/drivers/vfio/vfio_iommu_type1.c b/drivers/vfio/vfio_iommu_type1.c
    index a0747c35a778..fb695bf0b1c4 100644
    --- a/drivers/vfio/vfio_iommu_type1.c
    +++ b/drivers/vfio/vfio_iommu_type1.c
    @@ -567,7 +567,7 @@ static int vaddr_get_pfns(struct mm_struct *mm, unsigned long vaddr,
    vaddr = untagged_addr(vaddr);

    retry:
    - vma = find_vma_intersection(mm, vaddr, vaddr + 1);
    + vma = vma_lookup(mm, vaddr);

    if (vma && vma->vm_flags & VM_PFNMAP) {
    ret = follow_fault_pfn(vma, mm, vaddr, pfn, prot & IOMMU_WRITE);
    --
    2.30.2
    \
     
     \ /
      Last update: 2021-05-21 19:49    [W:4.101 / U:0.320 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site