diff options
author | Ingo Molnar <mingo@kernel.org> | 2021-11-15 18:46:51 +0100 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2022-03-15 11:28:34 +0100 |
commit | 83e1411d74061528dfaf674667f99b9c6f4bef68 (patch) | |
tree | c707c2d75a62d329508446ae071714dcc3356b1b /init | |
parent | 2a85e215b4110b71a64bd7c4c150e464b90b8e8d (diff) | |
download | tip-83e1411d74061528dfaf674667f99b9c6f4bef68.tar.gz |
headers/deps: Move task_struct::usage to per_task()
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'init')
-rw-r--r-- | init/init_task.c | 1 | ||||
-rw-r--r-- | init/main.c | 2 |
2 files changed, 2 insertions, 1 deletions
diff --git a/init/init_task.c b/init/init_task.c index db28bea46b16ba..24303991219d39 100644 --- a/init/init_task.c +++ b/init/init_task.c @@ -73,7 +73,6 @@ struct task_struct init_task .stack_refcount = REFCOUNT_INIT(1), #endif .__state = 0, - .usage = REFCOUNT_INIT(2), .flags = PF_KTHREAD, .prio = MAX_PRIO - 20, .static_prio = MAX_PRIO - 20, diff --git a/init/main.c b/init/main.c index d851b36f6a1647..13f645bd3820bc 100644 --- a/init/main.c +++ b/init/main.c @@ -899,6 +899,8 @@ void __init init_per_task_early(void) per_task(&init_task, stack) = init_stack; + refcount_set(&per_task(&init_task, usage), 2); + #ifdef CONFIG_CPUSETS per_task(&init_task, mems_allowed_seq) = (seqcount_spinlock_t) SEQCNT_SPINLOCK_ZERO(init_task.mems_allowed_seq, &init_task.alloc_lock); |