mm/ksm: use folio in write_protect_page
authorAlex Shi (tencent) <alexs@kernel.org>
Thu, 11 Apr 2024 06:17:08 +0000 (14:17 +0800)
committerAndrew Morton <akpm@linux-foundation.org>
Mon, 6 May 2024 00:53:34 +0000 (17:53 -0700)
commit40d707f33db5e6d7da37b701955a3f662a741b02
treef95579dc74e7fb92915f8625e017254a2c2b676a
parent72556a4c06646b7e314ee0920796699c9d4a8b47
mm/ksm: use folio in write_protect_page

Compound page is checked and skipped before write_protect_page() called,
use folio to save a few compound_head checks.

Link: https://lkml.kernel.org/r/20240411061713.1847574-8-alexs@kernel.org
Signed-off-by: Alex Shi (tencent) <alexs@kernel.org>
Reviewed-by: David Hildenbrand <david@redhat.com>
Cc: Izik Eidus <izik.eidus@ravellosystems.com>
Cc: Matthew Wilcox <willy@infradead.org>
Cc: Andrea Arcangeli <aarcange@redhat.com>
Cc: Hugh Dickins <hughd@google.com>
Cc: Chris Wright <chrisw@sous-sol.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
mm/ksm.c