Skip to content

Commit b25bcab

Browse files
urezkiakpm00
authored andcommitted
fork: use __vmalloc_node() for stack allocation
Replace __vmalloc_node_range() by __vmalloc_node(). The last variant requires less parameters and it uses exactly the same arguments which are partly now hidden inside __vmalloc_node(). This change does not change any functionality. It makes the code a bit simpler. Link: https://lkml.kernel.org/r/[email protected] Signed-off-by: Uladzislau Rezki (Sony) <[email protected]> Acked-by: Michal Hocko <[email protected]> Cc: Christian Brauner <[email protected]> Cc: Oleg Nesterov <[email protected]> Cc: Tejun Heo <[email protected]> Signed-off-by: Andrew Morton <[email protected]>
1 parent 9f171d9 commit b25bcab

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

kernel/fork.c

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -311,11 +311,9 @@ static int alloc_thread_stack_node(struct task_struct *tsk, int node)
311311
* so memcg accounting is performed manually on assigning/releasing
312312
* stacks to tasks. Drop __GFP_ACCOUNT.
313313
*/
314-
stack = __vmalloc_node_range(THREAD_SIZE, THREAD_ALIGN,
315-
VMALLOC_START, VMALLOC_END,
314+
stack = __vmalloc_node(THREAD_SIZE, THREAD_ALIGN,
316315
THREADINFO_GFP & ~__GFP_ACCOUNT,
317-
PAGE_KERNEL,
318-
0, node, __builtin_return_address(0));
316+
node, __builtin_return_address(0));
319317
if (!stack)
320318
return -ENOMEM;
321319

0 commit comments

Comments
 (0)