mm/vmalloc.c: optimize to reduce arguments of alloc_vmap_area()
authorBaoquan He <bhe@redhat.com>
Sat, 9 Mar 2024 04:44:54 +0000 (12:44 +0800)
committerAndrew Morton <akpm@linux-foundation.org>
Fri, 26 Apr 2024 03:56:08 +0000 (20:56 -0700)
commit4b68a773a7ceb3467efec308963140d3e217ec59
tree134f2a0963c19c9cb01071318462f822e6530880
parent5c46d5319bde73075c5f2cefd555426848eb506f
mm/vmalloc.c: optimize to reduce arguments of alloc_vmap_area()

If called by __get_vm_area_node(), by open coding the field assignments of
'struct vm_struct *vm', and move the vm->flags and vm->caller assignments
into __get_vm_area_node(), the passed in arguments 'flags' and 'caller'
can be removed.

This alleviates overloaded arguments passed in for alloc_vmap_area().

Link: https://lkml.kernel.org/r/20240309044454.648888-1-bhe@redhat.com
Signed-off-by: Baoquan He <bhe@redhat.com>
Reviewed-by: Uladzislau Rezki (Sony) <urezki@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
mm/vmalloc.c