
From: David Hildenbrand <david@redhat.com> mainline inclusion from mainline-6.8-rc1 commit 7123e19c3c9d1539c899ac8d919498e3393bb288 category: feature bugzilla: https://gitee.com/openeuler/kernel/issues/I9CESE CVE: NA ------------------------------------------------- Let's convert mfill_atomic_install_pte(). Link: https://lkml.kernel.org/r/20231220224504.646757-12-david@redhat.com Signed-off-by: David Hildenbrand <david@redhat.com> Reviewed-by: Yin Fengwei <fengwei.yin@intel.com> Reviewed-by: Ryan Roberts <ryan.roberts@arm.com> Cc: Hugh Dickins <hughd@google.com> Cc: Matthew Wilcox (Oracle) <willy@infradead.org> Cc: Muchun Song <muchun.song@linux.dev> Cc: Muchun Song <songmuchun@bytedance.com> Cc: Peter Xu <peterx@redhat.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> (cherry picked from commit 7123e19c3c9d1539c899ac8d919498e3393bb288) Signed-off-by: Kefeng Wang <wangkefeng.wang@huawei.com> --- mm/userfaultfd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mm/userfaultfd.c b/mm/userfaultfd.c index 32903238db3a..f8449f506af2 100644 --- a/mm/userfaultfd.c +++ b/mm/userfaultfd.c @@ -115,7 +115,7 @@ int mfill_atomic_install_pte(pmd_t *dst_pmd, /* Usually, cache pages are already added to LRU */ if (newly_allocated) folio_add_lru(folio); - page_add_file_rmap(page, dst_vma, false); + folio_add_file_rmap_pte(folio, page, dst_vma); } else { page_add_new_anon_rmap(page, dst_vma, dst_addr); folio_add_lru_vma(folio, dst_vma); -- 2.27.0