diff options
author | Miaohe Lin <linmiaohe@huawei.com> | 2022-07-04 15:21:52 +0200 |
---|---|---|
committer | akpm <akpm@linux-foundation.org> | 2022-07-18 02:14:45 +0200 |
commit | 74ba2b38ba990c563393e5cb540cad2939f49d95 (patch) | |
tree | e4b96d3f723cfdae568825787f6e0e0769d3aa99 | |
parent | mm/huge_memory: rename mmun_start to haddr in remove_migration_pmd (diff) | |
download | linux-74ba2b38ba990c563393e5cb540cad2939f49d95.tar.xz linux-74ba2b38ba990c563393e5cb540cad2939f49d95.zip |
mm/huge_memory: use helper function vma_lookup in split_huge_pages_pid
Use helper function vma_lookup to lookup the needed vma to simplify the
code. Minor readability improvement.
Link: https://lkml.kernel.org/r/20220704132201.14611-8-linmiaohe@huawei.com
Signed-off-by: Miaohe Lin <linmiaohe@huawei.com>
Reviewed-by: Muchun Song <songmuchun@bytedance.com>
Cc: Matthew Wilcox <willy@infradead.org>
Cc: Yang Shi <shy828301@gmail.com>
Cc: Zach O'Keefe <zokeefe@google.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
-rw-r--r-- | mm/huge_memory.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/mm/huge_memory.c b/mm/huge_memory.c index 5816ef8241af..a8f8af85ee17 100644 --- a/mm/huge_memory.c +++ b/mm/huge_memory.c @@ -2941,10 +2941,10 @@ static int split_huge_pages_pid(int pid, unsigned long vaddr_start, * table filled with PTE-mapped THPs, each of which is distinct. */ for (addr = vaddr_start; addr < vaddr_end; addr += PAGE_SIZE) { - struct vm_area_struct *vma = find_vma(mm, addr); + struct vm_area_struct *vma = vma_lookup(mm, addr); struct page *page; - if (!vma || addr < vma->vm_start) + if (!vma) break; /* skip special VMA and hugetlb VMA */ |