From: Yang Shi shy828301@gmail.com
mainline inclusion from mainline-v5.14-rc1 commit f4c0d8367ea492cdfc7f6d14763c02f472731592 category: feature bugzilla: https://gitee.com/openeuler/kernel/issues/IAFONL CVE: NA
Reference: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?i...
-------------------------------
The numa_migrate_prep() will be used by huge NUMA fault as well in the following patch, make it non-static.
Link: https://lkml.kernel.org/r/20210518200801.7413-3-shy828301@gmail.com Signed-off-by: Yang Shi shy828301@gmail.com Acked-by: Mel Gorman mgorman@suse.de Cc: Christian Borntraeger borntraeger@de.ibm.com Cc: Gerald Schaefer gerald.schaefer@linux.ibm.com Cc: Heiko Carstens hca@linux.ibm.com Cc: Huang Ying ying.huang@intel.com Cc: Hugh Dickins hughd@google.com Cc: Kirill A. Shutemov kirill.shutemov@linux.intel.com Cc: Michal Hocko mhocko@suse.com Cc: Vasily Gorbik gor@linux.ibm.com Cc: Zi Yan ziy@nvidia.com Signed-off-by: Andrew Morton akpm@linux-foundation.org Signed-off-by: Linus Torvalds torvalds@linux-foundation.org Signed-off-by: Nanyong Sun sunnanyong@huawei.com --- mm/internal.h | 3 +++ mm/memory.c | 5 ++--- 2 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/mm/internal.h b/mm/internal.h index a9fc47f3677f..800f8f42fdb7 100644 --- a/mm/internal.h +++ b/mm/internal.h @@ -673,4 +673,7 @@ struct migration_target_control {
DECLARE_PER_CPU(struct per_cpu_nodestat, boot_nodestats);
+int numa_migrate_prep(struct page *page, struct vm_area_struct *vma, + unsigned long addr, int page_nid, int *flags); + #endif /* __MM_INTERNAL_H */ diff --git a/mm/memory.c b/mm/memory.c index 5a309417efb7..0c4da925e8ad 100644 --- a/mm/memory.c +++ b/mm/memory.c @@ -4375,9 +4375,8 @@ static vm_fault_t do_fault(struct vm_fault *vmf) return ret; }
-static int numa_migrate_prep(struct page *page, struct vm_area_struct *vma, - unsigned long addr, int page_nid, - int *flags) +int numa_migrate_prep(struct page *page, struct vm_area_struct *vma, + unsigned long addr, int page_nid, int *flags) { get_page(page);