linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] mm: Remove PageAnonExclusive assertions in unuse_pte()
@ 2023-12-12 16:48 Matthew Wilcox (Oracle)
  2023-12-12 16:49 ` David Hildenbrand
  0 siblings, 1 reply; 2+ messages in thread
From: Matthew Wilcox (Oracle) @ 2023-12-12 16:48 UTC (permalink / raw)
  To: Andrew Morton; +Cc: Matthew Wilcox (Oracle), linux-mm, David Hildenbrand

The page in question is either freshly allocated or known to be in
the swap cache; these assertions are not particularly useful.

Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
---
 mm/swapfile.c | 4 ----
 1 file changed, 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);
-- 
2.42.0



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2023-12-12 16:49 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-12-12 16:48 [PATCH] mm: Remove PageAnonExclusive assertions in unuse_pte() Matthew Wilcox (Oracle)
2023-12-12 16:49 ` David Hildenbrand

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox