[PATCH 2/2] filemap: Add __filemap_get_folio_mpol()
Shivank Garg
shivankg at amd.com
Sun Jun 22 19:02:05 UTC 2025
On 6/23/2025 12:13 AM, Andrew Morton wrote:
> On Fri, 20 Jun 2025 17:53:15 +0100 Matthew Wilcox <willy at infradead.org> wrote:
>
>> On Fri, Jun 20, 2025 at 03:34:47PM +0100, Matthew Wilcox (Oracle) wrote:
>>> +struct folio *__filemap_get_folio_mpol(struct address_space *mapping,
>>> + pgoff_t index, fgf_t fgp_flags, gfp_t gfp,
>>> + struct mempolicy *policy)
>>> {
>>> struct folio *folio;
>>>
>>> @@ -1982,7 +1984,7 @@ struct folio *__filemap_get_folio(struct address_space *mapping, pgoff_t index,
>>> err = -ENOMEM;
>>> if (order > min_order)
>>> alloc_gfp |= __GFP_NORETRY | __GFP_NOWARN;
>>> - folio = filemap_alloc_folio(alloc_gfp, order, NULL);
>>> + folio = filemap_alloc_folio(alloc_gfp, order, policy);
>>> if (!folio)
>>> continue;
>>
>> This is missing the EXPORT_SYMBOL_GPL() change
>
> I added this:
>
> --- a/mm/filemap.c~filemap-add-__filemap_get_folio_mpol-fix
> +++ a/mm/filemap.c
> @@ -2032,7 +2032,7 @@ no_page:
> folio_clear_dropbehind(folio);
> return folio;
> }
> -EXPORT_SYMBOL(__filemap_get_folio);
> +EXPORT_SYMBOL(__filemap_get_folio_mpol);
>
> static inline struct folio *find_get_entry(struct xa_state *xas, pgoff_t max,
> xa_mark_t mark)
> _
>
Hi Andrew,
Thank you for addressing this.
If you don’t mind me asking,
I was curious why we used EXPORT_SYMBOL instead of EXPORT_SYMBOL_GPL here.
I had previously received feedback recommending the use of EXPORT_SYMBOL_GPL
to better align with the kernel’s licensing philosophy, which made sense to me.
Thanks,
Shivank
More information about the Linux-security-module-archive
mailing list