From f6ace0a50076b6f4e73b52b9483545d1e0140574 Mon Sep 17 00:00:00 2001 From: "Liam R. Howlett" Date: Wed, 30 Sep 2020 12:27:32 -0400 Subject: [PATCH] mm/mmap: Export find_vma_intersection to fix unresolved symbols in modules kvm was complaining that the static function has become an extern. Signed-off-by: Liam R. Howlett --- mm/mmap.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/mm/mmap.c b/mm/mmap.c index ce65330d2678..3ae869f39b8a 100644 --- a/mm/mmap.c +++ b/mm/mmap.c @@ -2117,22 +2117,23 @@ EXPORT_SYMBOL(get_unmapped_area); * Returns: The VMA associated with the @start or the next VMA within the range. */ struct vm_area_struct *find_vma_intersection(struct mm_struct *mm, - unsigned long addr, - unsigned long end) + unsigned long start_addr, + unsigned long end_addr) { struct vm_area_struct *vma; /* Check the cache first. */ - vma = vmacache_find(mm, addr); + vma = vmacache_find(mm, start_addr); if (likely(vma)) return vma; - vma = mt_find(&mm->mm_mt, &addr, end - 1); + vma = mt_find(&mm->mm_mt, &start_addr, end_addr - 1); if (vma) - vmacache_update(addr, vma); + vmacache_update(start_addr, vma); return vma; } +EXPORT_SYMBOL(find_vma_intersection); /** * find_vma() - Find the VMA for a given address, or the next vma. -- 2.50.1