
From: David Hildenbrand <david@redhat.com> mainline inclusion from mainline-v6.8-rc1 commit 18e8612e56244c6db3254d435a22344856a9c55b category: feature bugzilla: https://gitee.com/openeuler/kernel/issues/I9CESE CVE: NA ------------------------------------------------- Let's convert replace_page(). Link: https://lkml.kernel.org/r/20231220224504.646757-28-david@redhat.com Signed-off-by: David Hildenbrand <david@redhat.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> Cc: Ryan Roberts <ryan.roberts@arm.com> Cc: Yin Fengwei <fengwei.yin@intel.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> (cherry picked from commit 18e8612e56244c6db3254d435a22344856a9c55b) Signed-off-by: Kefeng Wang <wangkefeng.wang@huawei.com> --- mm/ksm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mm/ksm.c b/mm/ksm.c index fc4fc1f30fe4..3d3db4111262 100644 --- a/mm/ksm.c +++ b/mm/ksm.c @@ -1268,7 +1268,7 @@ static int replace_page(struct vm_area_struct *vma, struct page *page, add_reliable_page_counter(page, mm, -1); folio = page_folio(page); - page_remove_rmap(page, vma, false); + folio_remove_rmap_pte(folio, page, vma); if (!folio_mapped(folio)) folio_free_swap(folio); folio_put(folio); -- 2.27.0