Some cleanups around rmap for anon pages. I'm working on more cleanups also around file rmap -- also to handle the "compound" parameter internally only and to let hugetlb use page_add_file_rmap(), but these changes make sense separately. Cc: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> Cc: Mike Kravetz <mike.kravetz@xxxxxxxxxx> Cc: Muchun Song <muchun.song@xxxxxxxxx> David Hildenbrand (6): mm/rmap: drop stale comment in page_add_anon_rmap and hugepage_add_anon_rmap() mm/rmap: move SetPageAnonExclusive out of __page_set_anon_rmap() mm/rmap: move folio_test_anon() check out of __folio_set_anon() mm/rmap: warn on new PTE-mapped folios in page_add_anon_rmap() mm/rmap: simplify PageAnonExclusive sanity checks when adding anon rmap mm/rmap: pass folio to hugepage_add_anon_rmap() include/linux/rmap.h | 2 +- mm/migrate.c | 2 +- mm/rmap.c | 79 +++++++++++++++++++++----------------------- 3 files changed, 39 insertions(+), 44 deletions(-) -- 2.41.0