diff options
author | Ingo Molnar <mingo@elte.hu> | 2012-03-12 15:44:07 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2012-03-12 15:44:11 -0400 |
commit | 35239e23c66f1614c76739b62a299c3c92d6eb68 (patch) | |
tree | 7b1e068df888ec9a00b43c1dd7517a6490da6a94 /fs/exec.c | |
parent | 3f33ab1c0c741bfab2138c14ba1918a7905a1e8b (diff) | |
parent | 87e24f4b67e68d9fd8df16e0bf9c66d1ad2a2533 (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.c | 18 |
1 files changed, 2 insertions, 16 deletions
@@ -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); |
1948 | fail: | 1934 | |
1949 | return core_waiters; | 1935 | return core_waiters; |
1950 | } | 1936 | } |
1951 | 1937 | ||