Re: [PATCH] init: do_mounts: use kmalloc() for allocations of temporary buffers

From: Christian Brauner

Date: Fri May 22 2026 - 06:20:43 EST


On Wed, 20 May 2026 11:16:51 +0300, Mike Rapoport (Microsoft) wrote:
> Several places in init/do_mounts.c allocate temporary buffers for
> filesystem names or options using __get_free_page() or alloc_page().
>
> Usage of alloc_page() APIs is not required there and only creates
> unnecessary noise with castings or conversion from struct page to void *.
>
> kmalloc() is a better API for these uses and it also provides better
> scalability and more debugging possibilities.
>
> [...]

Applied to the vfs-7.2.misc branch of the vfs/vfs.git tree.
Patches in the vfs-7.2.misc branch should appear in linux-next soon.

Please report any outstanding bugs that were missed during review in a
new review to the original patch series allowing us to drop it.

It's encouraged to provide Acked-bys and Reviewed-bys even though the
patch has now been applied. If possible patch trailers will be updated.

Note that commit hashes shown below are subject to change due to rebase,
trailer updates or similar. If in doubt, please check the listed branch.

tree: https://git.kernel.org/pub/scm/linux/kernel/git/vfs/vfs.git
branch: vfs-7.2.misc

[1/1] init: do_mounts: use kmalloc() for allocations of temporary buffers
https://git.kernel.org/vfs/vfs/c/3fb2d124b647