Re: [PATCH] block: partitions: replace __get_free_page() with kmalloc()

From: Christoph Hellwig

Date: Mon May 25 2026 - 02:08:39 EST


On Wed, May 20, 2026 at 11:15:52AM +0300, Mike Rapoport (Microsoft) wrote:
> check_partition() allocates a buffer to use as backing buffer for
> seq_buf.
>
> This buffer can be allocated with kmalloc() as there's nothing special
> about it to go directly to the page allocator.
>
> Replace use of __get_free_page() with kmalloc() and free_page() with
> kfree().

So I heard various vague references that we should replace
__get_free_page with kmalloc, but nothing definitive. Can you please
point to a good resource for that?