Re: [PATCH] ubifs: vmalloc(array_size()) -> vmalloc_array()
From: Richard Weinberger
Date: Mon Aug 18 2025 - 09:57:26 EST
On Sun, Aug 17, 2025 at 10:12 AM Qianfeng Rong <rongqianfeng@xxxxxxxx> wrote:
>
> Remove array_size() calls and replace vmalloc() with vmalloc_array() in
> ubifs_create_dflt_lpt()/lpt_init_rd()/lpt_init_wr(). vmalloc_array() is
> optimized better, resulting in less instructions being used [1].
>
> [1]: https://lore.kernel.org/lkml/abc66ec5-85a4-47e1-9759-2f60ab111971@xxxxxxxx/
>
> Signed-off-by: Qianfeng Rong <rongqianfeng@xxxxxxxx>
> ---
> fs/ubifs/lpt.c | 12 ++++++------
> 1 file changed, 6 insertions(+), 6 deletions(-)
Makes sense. Do you want me to carry this through the ubifs tree or do you have
a distinct tree with all your vmalloc_array() patches?
--
Thanks,
//richard