diff mbox series

[01/59] mm: Fix VM_BUG_ON in __delete_from_swap_cache()

Message ID 20220808193430.3378317-2-willy@infradead.org (mailing list archive)
State New
Headers show
Series MM folio changes for 6.1 | expand

Commit Message

Matthew Wilcox Aug. 8, 2022, 7:33 p.m. UTC
Commit ceff9d3354e9 changed the VM_BUG_ON() to dump the folio we're
storing instead of the entry we retrieved.  This was a mistake; the
entry we retrieved is the more interesting page to dump.

Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
---
 mm/swap_state.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/mm/swap_state.c b/mm/swap_state.c
index e166051566f4..41afa6d45b23 100644
--- a/mm/swap_state.c
+++ b/mm/swap_state.c
@@ -151,7 +151,7 @@  void __delete_from_swap_cache(struct folio *folio,
 
 	for (i = 0; i < nr; i++) {
 		void *entry = xas_store(&xas, shadow);
-		VM_BUG_ON_FOLIO(entry != folio, folio);
+		VM_BUG_ON_PAGE(entry != folio, entry);
 		set_page_private(folio_page(folio, i), 0);
 		xas_next(&xas);
 	}