Skip to content

Commit 7ff3aaf

Browse files
Matthew Wilcox (Oracle)opsiff
authored andcommitted
mm: remove PageAnonExclusive assertions in unuse_pte()
mainline inclusion from mainline-v6.8-rc1 category: performance 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> (cherry picked from commit 8d294a8) Signed-off-by: Wentao Guan <guanwentao@uniontech.com>
1 parent 585d2c5 commit 7ff3aaf

1 file changed

Lines changed: 0 additions & 4 deletions

File tree

mm/swapfile.c

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1797,10 +1797,6 @@ static int unuse_pte(struct vm_area_struct *vma, pmd_t *pmd,
17971797
*/
17981798
arch_swap_restore(entry, page_folio(page));
17991799

1800-
/* See do_swap_page() */
1801-
BUG_ON(!PageAnon(page) && PageMappedToDisk(page));
1802-
BUG_ON(PageAnon(page) && PageAnonExclusive(page));
1803-
18041800
dec_mm_counter(vma->vm_mm, MM_SWAPENTS);
18051801
inc_mm_counter(vma->vm_mm, MM_ANONPAGES);
18061802
get_page(page);

0 commit comments

Comments
 (0)