summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthew Wilcox (Oracle) <willy@infradead.org>2023-12-12 16:48:13 +0000
committerAndrew Morton <akpm@linux-foundation.org>2023-12-29 11:58:25 -0800
commit8d294a8c6393afbde59cf14a0e8413df4b206698 (patch)
treeadaa0d9e3411fb9deb5a10318c625d585bef4730
parent96db66d9c8f3c1547325af01b1f328b85d6ee1b9 (diff)
downloadlinux-stable-8d294a8c6393afbde59cf14a0e8413df4b206698.tar.gz
linux-stable-8d294a8c6393afbde59cf14a0e8413df4b206698.tar.bz2
linux-stable-8d294a8c6393afbde59cf14a0e8413df4b206698.zip
mm: remove PageAnonExclusive assertions in unuse_pte()
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>
-rw-r--r--mm/swapfile.c4
1 files changed, 0 insertions, 4 deletions
diff --git a/mm/swapfile.c b/mm/swapfile.c
index 0371b7b3cd27..85f9c355cb99 100644
--- a/mm/swapfile.c
+++ b/mm/swapfile.c
@@ -1788,10 +1788,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);
get_page(page);