diff options
author | Oleg Nesterov <oleg@tv-sign.ru> | 2006-01-08 04:04:02 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-01-08 23:14:01 -0500 |
commit | fe7d37d1fbf8ffe78abd72728b24fb0c64f7af55 (patch) | |
tree | 274d82b06d2a711e84381b1357c6332077181d27 | |
parent | ddc0f846aa7621940b74cee0c91cd26405058a4d (diff) |
[PATCH] copy_process: error path cleanup
This patch moves 'fork_out:' under 'bad_fork_free:', and removes now
unneeded 'if (retval)' check.
Signed-off-by: Oleg Nesterov <oleg@tv-sign.ru>
Cc: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
-rw-r--r-- | kernel/fork.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/kernel/fork.c b/kernel/fork.c index 4bc0bd8ef176..72e3252c6763 100644 --- a/kernel/fork.c +++ b/kernel/fork.c | |||
@@ -1146,11 +1146,6 @@ static task_t *copy_process(unsigned long clone_flags, | |||
1146 | total_forks++; | 1146 | total_forks++; |
1147 | write_unlock_irq(&tasklist_lock); | 1147 | write_unlock_irq(&tasklist_lock); |
1148 | proc_fork_connector(p); | 1148 | proc_fork_connector(p); |
1149 | retval = 0; | ||
1150 | |||
1151 | fork_out: | ||
1152 | if (retval) | ||
1153 | return ERR_PTR(retval); | ||
1154 | return p; | 1149 | return p; |
1155 | 1150 | ||
1156 | bad_fork_cleanup_namespace: | 1151 | bad_fork_cleanup_namespace: |
@@ -1191,7 +1186,8 @@ bad_fork_cleanup_count: | |||
1191 | free_uid(p->user); | 1186 | free_uid(p->user); |
1192 | bad_fork_free: | 1187 | bad_fork_free: |
1193 | free_task(p); | 1188 | free_task(p); |
1194 | goto fork_out; | 1189 | fork_out: |
1190 | return ERR_PTR(retval); | ||
1195 | } | 1191 | } |
1196 | 1192 | ||
1197 | struct pt_regs * __devinit __attribute__((weak)) idle_regs(struct pt_regs *regs) | 1193 | struct pt_regs * __devinit __attribute__((weak)) idle_regs(struct pt_regs *regs) |