summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthew Wilcox (Oracle) <willy@infradead.org>2022-09-02 20:26:38 +0100
committerAndrew Morton <akpm@linux-foundation.org>2022-09-11 16:22:31 -0700
commitb9eb7776e8a64f9d53e8fa1cd27acb3024c74893 (patch)
treef1a24db67de239fab03ac89adab680739a2fd2b3
parent283c05f66dcaecb0c6d5c55dd7e4dab5c631dd92 (diff)
downloadlinux-stable-b9eb7776e8a64f9d53e8fa1cd27acb3024c74893.tar.gz
linux-stable-b9eb7776e8a64f9d53e8fa1cd27acb3024c74893.tar.bz2
linux-stable-b9eb7776e8a64f9d53e8fa1cd27acb3024c74893.zip
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: ceff9d3354e9 ("mm/swap: convert __delete_from_swap_cache() to a folio") Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org> Cc: Hugh Dickins <hughd@google.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
-rw-r--r--mm/swap_state.c2
1 files changed, 1 insertions, 1 deletions
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);
}