Re: [PATCH v3 4/4] mm/vmalloc: cleanup gfp flag use in new_vmap_block()

Uladzislau Rezki
2025-11-18T09:36:23Z

On Mon, Nov 17, 2025 at 09:35:30AM -0800, Vishal Moola (Oracle) wrote:
> The only caller, vb_alloc(), passes GFP_KERNEL into new_vmap_block()
> which is a subset of GFP_RECLAIM_MASK. Since there's no reason to use
> this mask here, remove it.
>
> Signed-off-by: Vishal Moola (Oracle) <vishal.moola@gmail.com>
> Reviewed-by: Uladzislau Rezki (Sony) <urezki@gmail.com>
> ---
> mm/vmalloc.c | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/mm/vmalloc.c b/mm/vmalloc.c
> index d343db806170..d55a77977762 100644
> --- a/mm/vmalloc.c
> +++ b/mm/vmalloc.c
> @@ -2699,8 +2699,7 @@ static void *new_vmap_block(unsigned int order, gfp_t gfp_mask)
>
> node = numa_node_id();
>
> - vb = kmalloc_node(sizeof(struct vmap_block),
> - gfp_mask & GFP_RECLAIM_MASK, node);
> + vb = kmalloc_node(sizeof(struct vmap_block), gfp_mask, node);
> if (unlikely(!vb))
> return ERR_PTR(-ENOMEM);
>
> --
> 2.51.1
>
Reviewed-by: "Uladzislau Rezki (Sony)" <urezki@gmail.com>

--
Uladzislau Rezki