mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 19:21:31 -04:00
vfork: introduce complete_vfork_done()
No functional changes. Move the clear-and-complete-vfork_done code into the new trivial helper, complete_vfork_done(). Signed-off-by: Oleg Nesterov <[email protected]> Acked-by: Tejun Heo <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
This commit is contained in:
parent
880641bb9d
commit
c415c3b47e
3 changed files with 13 additions and 13 deletions
|
|
@ -1915,7 +1915,6 @@ static int coredump_wait(int exit_code, struct core_state *core_state)
|
|||
{
|
||||
struct task_struct *tsk = current;
|
||||
struct mm_struct *mm = tsk->mm;
|
||||
struct completion *vfork_done;
|
||||
int core_waiters = -EBUSY;
|
||||
|
||||
init_completion(&core_state->startup);
|
||||
|
|
@ -1934,11 +1933,8 @@ static int coredump_wait(int exit_code, struct core_state *core_state)
|
|||
* Make sure nobody is waiting for us to release the VM,
|
||||
* otherwise we can deadlock when we wait on each other
|
||||
*/
|
||||
vfork_done = tsk->vfork_done;
|
||||
if (vfork_done) {
|
||||
tsk->vfork_done = NULL;
|
||||
complete(vfork_done);
|
||||
}
|
||||
if (tsk->vfork_done)
|
||||
complete_vfork_done(tsk);
|
||||
|
||||
if (core_waiters)
|
||||
wait_for_completion(&core_state->startup);
|
||||
|
|
|
|||
Loading…
Reference in a new issue