]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
mm/huge_memory: work on folio->swap instead of page->private when splitting folio
authorDavid Hildenbrand <david@redhat.com>
Mon, 21 Aug 2023 16:08:49 +0000 (18:08 +0200)
committerAndrew Morton <akpm@linux-foundation.org>
Thu, 24 Aug 2023 23:20:28 +0000 (16:20 -0700)
commit07e09c483cbef2a252f75d95670755a0607288f5
tree15f38d9a549e22aef6bd9a270ace05a7aa5c7f6d
parent3d2c908768877714a354ee6d7bf93e801400d5e2
mm/huge_memory: work on folio->swap instead of page->private when splitting folio

Let's work on folio->swap instead.  While at it, use folio_test_anon() and
folio_test_swapcache() -- the original folio remains valid even after
splitting (but is then an order-0 folio).

We can probably convert a lot more to folios in that code, let's focus on
folio->swap handling only for now.

Link: https://lkml.kernel.org/r/20230821160849.531668-5-david@redhat.com
Signed-off-by: David Hildenbrand <david@redhat.com>
Reviewed-by: Chris Li <chrisl@kernel.org>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Dan Streetman <ddstreet@ieee.org>
Cc: Hugh Dickins <hughd@google.com>
Cc: Matthew Wilcox (Oracle) <willy@infradead.org>
Cc: Peter Xu <peterx@redhat.com>
Cc: Seth Jennings <sjenning@redhat.com>
Cc: Vitaly Wool <vitaly.wool@konsulko.com>
Cc: Will Deacon <will@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
mm/huge_memory.c