]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
mm/vmalloc: refactor __vmalloc_node_range_noprof()
authorLiu Ye <liuye@kylinos.cn>
Thu, 6 Mar 2025 07:21:31 +0000 (15:21 +0800)
committerAndrew Morton <akpm@linux-foundation.org>
Tue, 18 Mar 2025 05:06:58 +0000 (22:06 -0700)
commitf0e11a997ab438ce91a7dc9a6dd64c0c4a6af112
tree60f86ff6fa96ef023b9f4fff5ead543e2aa44326
parent3a812bed3d32ae8c7443d1dd82f20b9a7e503ed2
mm/vmalloc: refactor __vmalloc_node_range_noprof()

According to the code logic, the first parameter of the sub-function
__get_vm_area_node() should be size instead of real_size.

Then in __get_vm_area_node(), the size will be aligned, so the redundant
alignment operation is deleted.

The use of the real_size variable causes code redundancy, so it is removed
to simplify the code.

The real prefix is generally used to indicate the adjusted value of a
parameter, but according to the code logic, it should indicate the
original value, so it is recommended to rename it to original_align.

Link: https://lkml.kernel.org/r/20250306072131.800499-1-liuye@kylinos.cn
Signed-off-by: Liu Ye <liuye@kylinos.cn>
Reviewed-by: "Uladzislau Rezki (Sony)" <urezki@gmail.com>
Cc: Christop Hellwig <hch@infradead.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
mm/vmalloc.c