diff options
author | Ingo Molnar <mingo@kernel.org> | 2017-02-02 05:50:56 -0500 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2017-03-02 02:42:25 -0500 |
commit | 780de9dd2720debc14c501dab4dc80d1f75ad50e (patch) | |
tree | 706aee839aae1d5f82391eeb5c76cc8088c53e27 /kernel/fork.c | |
parent | f9411ebe3d85cbbea06298241e6053d031d281fc (diff) |
sched/headers, cgroups: Remove the threadgroup_change_*() wrappery
threadgroup_change_begin()/end() is a pointless wrapper around
cgroup_threadgroup_change_begin()/end(), minus a might_sleep()
in the !CONFIG_CGROUPS=y case.
Remove the wrappery, move the might_sleep() (the down_read()
already has a might_sleep() check).
This debloats <linux/sched.h> a bit and simplifies this API.
Update all call sites.
No change in functionality.
Acked-by: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'kernel/fork.c')
-rw-r--r-- | kernel/fork.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/kernel/fork.c b/kernel/fork.c index 246bf9aaf9df..d043fedc03c8 100644 --- a/kernel/fork.c +++ b/kernel/fork.c | |||
@@ -1746,7 +1746,7 @@ static __latent_entropy struct task_struct *copy_process( | |||
1746 | INIT_LIST_HEAD(&p->thread_group); | 1746 | INIT_LIST_HEAD(&p->thread_group); |
1747 | p->task_works = NULL; | 1747 | p->task_works = NULL; |
1748 | 1748 | ||
1749 | threadgroup_change_begin(current); | 1749 | cgroup_threadgroup_change_begin(current); |
1750 | /* | 1750 | /* |
1751 | * Ensure that the cgroup subsystem policies allow the new process to be | 1751 | * Ensure that the cgroup subsystem policies allow the new process to be |
1752 | * forked. It should be noted the the new process's css_set can be changed | 1752 | * forked. It should be noted the the new process's css_set can be changed |
@@ -1843,7 +1843,7 @@ static __latent_entropy struct task_struct *copy_process( | |||
1843 | 1843 | ||
1844 | proc_fork_connector(p); | 1844 | proc_fork_connector(p); |
1845 | cgroup_post_fork(p); | 1845 | cgroup_post_fork(p); |
1846 | threadgroup_change_end(current); | 1846 | cgroup_threadgroup_change_end(current); |
1847 | perf_event_fork(p); | 1847 | perf_event_fork(p); |
1848 | 1848 | ||
1849 | trace_task_newtask(p, clone_flags); | 1849 | trace_task_newtask(p, clone_flags); |
@@ -1854,7 +1854,7 @@ static __latent_entropy struct task_struct *copy_process( | |||
1854 | bad_fork_cancel_cgroup: | 1854 | bad_fork_cancel_cgroup: |
1855 | cgroup_cancel_fork(p); | 1855 | cgroup_cancel_fork(p); |
1856 | bad_fork_free_pid: | 1856 | bad_fork_free_pid: |
1857 | threadgroup_change_end(current); | 1857 | cgroup_threadgroup_change_end(current); |
1858 | if (pid != &init_struct_pid) | 1858 | if (pid != &init_struct_pid) |
1859 | free_pid(pid); | 1859 | free_pid(pid); |
1860 | bad_fork_cleanup_thread: | 1860 | bad_fork_cleanup_thread: |