提交 b9eb7776 编写于 作者: M Matthew Wilcox (Oracle) 提交者: Andrew Morton

mm: fix VM_BUG_ON in __delete_from_swap_cache()

Patch series "Folio fixes for 6.0".


This patch (of 2):

The recent folio conversion 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.

Link: https://lkml.kernel.org/r/20220902192639.1737108-1-willy@infradead.org
Link: https://lkml.kernel.org/r/20220902192639.1737108-2-willy@infradead.org
Fixes: ceff9d33 ("mm/swap: convert __delete_from_swap_cache() to a folio")
Signed-off-by: NMatthew Wilcox (Oracle) <willy@infradead.org>
Cc: Hugh Dickins <hughd@google.com>
Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
上级 283c05f6
...@@ -151,7 +151,7 @@ void __delete_from_swap_cache(struct folio *folio, ...@@ -151,7 +151,7 @@ void __delete_from_swap_cache(struct folio *folio,
for (i = 0; i < nr; i++) { for (i = 0; i < nr; i++) {
void *entry = xas_store(&xas, shadow); 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); set_page_private(folio_page(folio, i), 0);
xas_next(&xas); xas_next(&xas);
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册