aboutsummaryrefslogtreecommitdiffstats
path: root/fs/exec.c
diff options
context:
space:
mode:
authorIngo Molnar <mingo@elte.hu>2012-03-12 15:44:07 -0400
committerIngo Molnar <mingo@elte.hu>2012-03-12 15:44:11 -0400
commit35239e23c66f1614c76739b62a299c3c92d6eb68 (patch)
tree7b1e068df888ec9a00b43c1dd7517a6490da6a94 /fs/exec.c
parent3f33ab1c0c741bfab2138c14ba1918a7905a1e8b (diff)
parent87e24f4b67e68d9fd8df16e0bf9c66d1ad2a2533 (diff)
Merge branch 'perf/urgent' into perf/core
Merge reason: We are going to queue up a dependent patch. Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'fs/exec.c')
-rw-r--r--fs/exec.c18
1 files changed, 2 insertions, 16 deletions
diff --git a/fs/exec.c b/fs/exec.c
index 92cbd916804f..b0695a9900ef 100644
--- a/fs/exec.c
+++ b/fs/exec.c
@@ -1918,7 +1918,6 @@ static int coredump_wait(int exit_code, struct core_state *core_state)
1918{ 1918{
1919 struct task_struct *tsk = current; 1919 struct task_struct *tsk = current;
1920 struct mm_struct *mm = tsk->mm; 1920 struct mm_struct *mm = tsk->mm;
1921 struct completion *vfork_done;
1922 int core_waiters = -EBUSY; 1921 int core_waiters = -EBUSY;
1923 1922
1924 init_completion(&core_state->startup); 1923 init_completion(&core_state->startup);
@@ -1930,22 +1929,9 @@ static int coredump_wait(int exit_code, struct core_state *core_state)
1930 core_waiters = zap_threads(tsk, mm, core_state, exit_code); 1929 core_waiters = zap_threads(tsk, mm, core_state, exit_code);
1931 up_write(&mm->mmap_sem); 1930 up_write(&mm->mmap_sem);
1932 1931
1933 if (unlikely(core_waiters < 0)) 1932 if (core_waiters > 0)
1934 goto fail;
1935
1936 /*
1937 * Make sure nobody is waiting for us to release the VM,
1938 * otherwise we can deadlock when we wait on each other
1939 */
1940 vfork_done = tsk->vfork_done;
1941 if (vfork_done) {
1942 tsk->vfork_done = NULL;
1943 complete(vfork_done);
1944 }
1945
1946 if (core_waiters)
1947 wait_for_completion(&core_state->startup); 1933 wait_for_completion(&core_state->startup);
1948fail: 1934
1949 return core_waiters; 1935 return core_waiters;
1950} 1936}
1951 1937