mm/filemap: clean up hugetlb exclusion code
authorKairui Song <kasong@tencent.com>
Mon, 15 Apr 2024 17:18:54 +0000 (01:18 +0800)
committerAndrew Morton <akpm@linux-foundation.org>
Fri, 26 Apr 2024 03:56:09 +0000 (20:56 -0700)
commitb2ebcf9d3d5a0108f640d8c8200ece8848045725
treea300779f990e54b00025255c92a37e66c8a8919f
parentde60fd8ddeda2b41fbe11df11733838c5f684616
mm/filemap: clean up hugetlb exclusion code

__filemap_add_folio only has two callers, one never passes hugetlb folio
and one always passes in hugetlb folio.  So move the hugetlb related
cgroup charging out of it to make the code cleaner.

Link: https://lkml.kernel.org/r/20240415171857.19244-3-ryncsn@gmail.com
Signed-off-by: Kairui Song <kasong@tencent.com>
Acked-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
mm/filemap.c