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 22/22] mm/mempolicy: Use vma_lookup() in __access_remote_vm()
    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>
    ---
    mm/mempolicy.c | 2 +-
    1 file changed, 1 insertion(+), 1 deletion(-)

    diff --git a/mm/mempolicy.c b/mm/mempolicy.c
    index d79fa299b70c..325771bef5e2 100644
    --- a/mm/mempolicy.c
    +++ b/mm/mempolicy.c
    @@ -975,7 +975,7 @@ static long do_get_mempolicy(int *policy, nodemask_t *nmask,
    * want to return MPOL_DEFAULT in this case.
    */
    mmap_read_lock(mm);
    - vma = find_vma_intersection(mm, addr, addr+1);
    + vma = vma_lookup(mm, addr);
    if (!vma) {
    mmap_read_unlock(mm);
    return -EFAULT;
    --
    2.30.2
    \
     
     \ /
      Last update: 2021-05-21 19:49    [W:4.461 / U:0.316 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site