]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
ubifs: vmalloc(array_size()) -> vmalloc_array()
authorQianfeng Rong <rongqianfeng@vivo.com>
Sun, 17 Aug 2025 08:12:38 +0000 (16:12 +0800)
committerRichard Weinberger <richard@nod.at>
Fri, 28 Nov 2025 20:52:55 +0000 (21:52 +0100)
commit0695aef23d674815c352293c49d944a2375ee9c9
tree804d455a86850e413d95778ccfb74f214c93118c
parentd133e30aabc7c8eb8206827f8fbe0f3679adb911
ubifs: vmalloc(array_size()) -> vmalloc_array()

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@vivo.com/

Signed-off-by: Qianfeng Rong <rongqianfeng@vivo.com>
Reviewed-by: Zhihao Cheng <chengzhihao1@huawei.com>
Signed-off-by: Richard Weinberger <richard@nod.at>
fs/ubifs/lpt.c