kernel/fork.c: put set_max_threads()/task_struct_whitelist() in __init section
authorWei Yang <richard.weiyang@gmail.com>
Mon, 1 Jul 2024 01:34:10 +0000 (01:34 +0000)
committerAndrew Morton <akpm@linux-foundation.org>
Wed, 10 Jul 2024 19:14:54 +0000 (12:14 -0700)
commit9325585288f2742b4b6effd5246154c374b9100f
treef6ea728e4d8eff5a5decb5cfacf64913c5fbd764
parent66b4aaf7335c9e7f59ba93a45379ba2bbfe1b913
kernel/fork.c: put set_max_threads()/task_struct_whitelist() in __init section

The functions set_max_threads() and task_struct_whitelist() are only used
by fork_init() during bootup.

Let's add __init tag to them.

Link: https://lkml.kernel.org/r/20240701013410.17260-2-richard.weiyang@gmail.com
Signed-off-by: Wei Yang <richard.weiyang@gmail.com>
Suggested-by: Oleg Nesterov <oleg@redhat.com>
Cc: David Hildenbrand <david@redhat.com>
Cc: Mike Rapoport (IBM) <rppt@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
kernel/fork.c