Re: [RFC PATCH v8 3/7] mm/filemap: Add mempolicy support to the filemap layer
From: Matthew Wilcox
Date: Fri Jun 20 2025 - 10:35:00 EST
On Fri, Jun 20, 2025 at 11:29:20AM +0530, Shivank Garg wrote:
> filemap_grab_folio_mpol() is used in [Patch 6/7] in kvm_gmem_prepare_folio().
>
> filemap_alloc_folio_mpol() and __filemap_get_folio_mpol()) are internally used
> to support the filemap_grab_folio_mpol().
That's not better. We don't add unused functions, and unless there's
something coming that's going to use them, the entire structure of this
is wrong.
filemap_grab_folio() is a convenience function that avoids us having to
specify the other two arguments to __filemap_get_folio(). Since there's
no indication at this point that there are going to be more callers of
it, filemap_grab_folio_mpol() should not even exist.
I'll send a pair of patches which should be sufficient for your needs.