Re: [PATCH 2/4] mm/filemap: clean up hugetlb exclusion code

From: Matthew Wilcox
Date: Tue Mar 19 2024 - 12:48:17 EST


On Tue, Mar 19, 2024 at 05:27:31PM +0800, Kairui Song wrote:
> From: Kairui Song <kasong@xxxxxxxxxxx>
>
> __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.
>
> Signed-off-by: Kairui Song <kasong@xxxxxxxxxxx>

Ah; excellent. I once had a patch along these lines, but it never made
it in. Happy things got refactored to the point where it's now easy,
and mildly annoyed at myself that I hadn't spotted it yet.

Acked-by: Matthew Wilcox (Oracle) <willy@xxxxxxxxxxxxx>

(I'm acking these on the assumption that Andrew's just going to take
them; I can collect them myself if that makes anybody else's life
easier)