]> www.infradead.org Git - users/dwmw2/linux.git/commit
ksm: convert cmp_and_merge_page() to use a folio
authorMatthew Wilcox (Oracle) <willy@infradead.org>
Wed, 2 Oct 2024 15:25:28 +0000 (16:25 +0100)
committerAndrew Morton <akpm@linux-foundation.org>
Thu, 7 Nov 2024 04:11:08 +0000 (20:11 -0800)
commit98c3ca0015b8a5af7f98109261bd9a471097135b
treed7b6d7b4da7785205766b495e5f1c7a9cbbaacf3
parent9c0a1b99e3919f5fddeeaf96b36f86ccc5cc2a10
ksm: convert cmp_and_merge_page() to use a folio

By making try_to_merge_two_pages() and stable_tree_search() return a
folio, we can replace kpage with kfolio.  This replaces 7 calls to
compound_head() with one.

[cuigaosheng1@huawei.com: add IS_ERR_OR_NULL check for stable_tree_search()]
Signed-off-by: Gaosheng Cui <cuigaosheng1@huawei.com>
Link: https://lkml.kernel.org/r/20241002152533.1350629-3-willy@infradead.org
Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Acked-by: David Hildenbrand <david@redhat.com>
Cc: Alex Shi <alexs@kernel.org>
Cc: Gaosheng Cui <cuigaosheng1@huawei.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
mm/ksm.c