aboutsummaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorOleg Nesterov <oleg@redhat.com>2012-03-05 17:59:13 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2012-03-05 18:49:42 -0500
commitc415c3b47ea2754659d915cca387a20999044163 (patch)
treec2cb1134f139702e06ade8aecbeff70be7ea727c /fs
parent880641bb9da2473e9ecf6c708d993b29928c1b3c (diff)
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 <oleg@redhat.com> Acked-by: Tejun Heo <tj@kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'fs')
-rw-r--r--fs/exec.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/fs/exec.c b/fs/exec.c
index 92ce83a11e90..dccdcec913e9 100644
--- a/fs/exec.c
+++ b/fs/exec.c
@@ -1915,7 +1915,6 @@ static int coredump_wait(int exit_code, struct core_state *core_state)
1915{ 1915{
1916 struct task_struct *tsk = current; 1916 struct task_struct *tsk = current;
1917 struct mm_struct *mm = tsk->mm; 1917 struct mm_struct *mm = tsk->mm;
1918 struct completion *vfork_done;
1919 int core_waiters = -EBUSY; 1918 int core_waiters = -EBUSY;
1920 1919
1921 init_completion(&core_state->startup); 1920 init_completion(&core_state->startup);
@@ -1934,11 +1933,8 @@ static int coredump_wait(int exit_code, struct core_state *core_state)
1934 * Make sure nobody is waiting for us to release the VM, 1933 * Make sure nobody is waiting for us to release the VM,
1935 * otherwise we can deadlock when we wait on each other 1934 * otherwise we can deadlock when we wait on each other
1936 */ 1935 */
1937 vfork_done = tsk->vfork_done; 1936 if (tsk->vfork_done)
1938 if (vfork_done) { 1937 complete_vfork_done(tsk);
1939 tsk->vfork_done = NULL;
1940 complete(vfork_done);
1941 }
1942 1938
1943 if (core_waiters) 1939 if (core_waiters)
1944 wait_for_completion(&core_state->startup); 1940 wait_for_completion(&core_state->startup);