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>
This commit is contained in:
@@ -1088,7 +1088,7 @@ static int de_thread(struct task_struct *tsk)
|
||||
struct task_struct *leader = tsk->group_leader;
|
||||
|
||||
for (;;) {
|
||||
threadgroup_change_begin(tsk);
|
||||
cgroup_threadgroup_change_begin(tsk);
|
||||
write_lock_irq(&tasklist_lock);
|
||||
/*
|
||||
* Do this under tasklist_lock to ensure that
|
||||
@@ -1099,7 +1099,7 @@ static int de_thread(struct task_struct *tsk)
|
||||
break;
|
||||
__set_current_state(TASK_KILLABLE);
|
||||
write_unlock_irq(&tasklist_lock);
|
||||
threadgroup_change_end(tsk);
|
||||
cgroup_threadgroup_change_end(tsk);
|
||||
schedule();
|
||||
if (unlikely(__fatal_signal_pending(tsk)))
|
||||
goto killed;
|
||||
@@ -1157,7 +1157,7 @@ static int de_thread(struct task_struct *tsk)
|
||||
if (unlikely(leader->ptrace))
|
||||
__wake_up_parent(leader, leader->parent);
|
||||
write_unlock_irq(&tasklist_lock);
|
||||
threadgroup_change_end(tsk);
|
||||
cgroup_threadgroup_change_end(tsk);
|
||||
|
||||
release_task(leader);
|
||||
}
|
||||
|
Reference in New Issue
Block a user