mm/rmap: add hugetlb sanity checks for anon rmap handling
authorDavid Hildenbrand <david@redhat.com>
Wed, 20 Dec 2023 22:44:30 +0000 (23:44 +0100)
committerAndrew Morton <akpm@linux-foundation.org>
Fri, 29 Dec 2023 19:58:48 +0000 (11:58 -0800)
commita4ea18641d8330a97d7d66f0ab017b690099ffce
tree120c1a82c405625fb8129cce10c1e79829e0278b
parent0c2ec32bf0b2f0d7ccb98c53ee5d255d68e73595
mm/rmap: add hugetlb sanity checks for anon rmap handling

Let's make sure we end up with the right folios in the right functions
when adding an anon rmap, just like we already do in the other rmap
functions.

Link: https://lkml.kernel.org/r/20231220224504.646757-7-david@redhat.com
Signed-off-by: David Hildenbrand <david@redhat.com>
Reviewed-by: Ryan Roberts <ryan.roberts@arm.com>
Cc: Hugh Dickins <hughd@google.com>
Cc: Matthew Wilcox (Oracle) <willy@infradead.org>
Cc: Muchun Song <muchun.song@linux.dev>
Cc: Muchun Song <songmuchun@bytedance.com>
Cc: Peter Xu <peterx@redhat.com>
Cc: Yin Fengwei <fengwei.yin@intel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
mm/rmap.c