From: "Matthew Wilcox (Oracle)" willy@infradead.org
mainline inclusion from mainline-v6.8-rc1 commit 8d294a8c6393afbde59cf14a0e8413df4b206698 category: feature bugzilla: https://gitee.com/openeuler/kernel/issues/I9OCYO CVE: NA
Reference: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?i...
--------------------------------
The page in question is either freshly allocated or known to be in the swap cache; these assertions are not particularly useful.
Link: https://lkml.kernel.org/r/20231212164813.2540119-1-willy@infradead.org Signed-off-by: Matthew Wilcox (Oracle) willy@infradead.org Reviewed-by: David Hildenbrand david@redhat.com Signed-off-by: Andrew Morton akpm@linux-foundation.org [ Dep-of: f238b8c33c67 ("arm64: mm: swap: support THP_SWAP on hardware with MTE"). ] Signed-off-by: Liu Shixin liushixin2@huawei.com --- mm/swapfile.c | 4 ---- 1 file changed, 4 deletions(-)
diff --git a/mm/swapfile.c b/mm/swapfile.c index dff84e2e219f..75d5e6977d0d 100644 --- a/mm/swapfile.c +++ b/mm/swapfile.c @@ -1887,10 +1887,6 @@ static int unuse_pte(struct vm_area_struct *vma, pmd_t *pmd, */ arch_swap_restore(entry, page_folio(page));
- /* See do_swap_page() */ - BUG_ON(!PageAnon(page) && PageMappedToDisk(page)); - BUG_ON(PageAnon(page) && PageAnonExclusive(page)); - dec_mm_counter(vma->vm_mm, MM_SWAPENTS); inc_mm_counter(vma->vm_mm, MM_ANONPAGES); add_reliable_page_counter(page, vma->vm_mm, 1);