[RFC PATCH v8 3/7] mm/filemap: Add mempolicy support to the filemap layer

Matthew Wilcox willy at infradead.org
Fri Jun 20 14:58:02 UTC 2025


On Fri, Jun 20, 2025 at 08:22:49PM +0530, Shivank Garg wrote:
> 
> 
> On 6/20/2025 8:04 PM, Matthew Wilcox wrote:
> > 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.
> 
> Thank you willy :)
> I'll them add to my series.

Thanks.  You probably want to touch up the commit messages, I didn't
spend very long on them.



More information about the Linux-security-module-archive mailing list