svn commit: r219195 - stable/8/sys/compat/linux
Dmitry Chagin
dchagin at FreeBSD.org
Wed Mar 2 19:39:43 UTC 2011
Author: dchagin
Date: Wed Mar 2 19:39:42 2011
New Revision: 219195
URL: http://svn.freebsd.org/changeset/base/219195
Log:
MFC r218618:
Slightly rewrite linux_fork:
1) Remove bogus error checking.
2) A new process exit from kernel through fork_trampoline(),
so remove bogus check.
Modified:
stable/8/sys/compat/linux/linux_fork.c
Directory Properties:
stable/8/sys/ (props changed)
stable/8/sys/amd64/include/xen/ (props changed)
stable/8/sys/cddl/contrib/opensolaris/ (props changed)
stable/8/sys/contrib/dev/acpica/ (props changed)
stable/8/sys/contrib/pf/ (props changed)
Modified: stable/8/sys/compat/linux/linux_fork.c
==============================================================================
--- stable/8/sys/compat/linux/linux_fork.c Wed Mar 2 19:38:13 2011 (r219194)
+++ stable/8/sys/compat/linux/linux_fork.c Wed Mar 2 19:39:42 2011 (r219195)
@@ -67,13 +67,9 @@ linux_fork(struct thread *td, struct lin
if ((error = fork1(td, RFFDG | RFPROC | RFSTOPPED, 0, &p2)) != 0)
return (error);
- if (error == 0) {
- td->td_retval[0] = p2->p_pid;
- td->td_retval[1] = 0;
- }
+ td->td_retval[0] = p2->p_pid;
+ td->td_retval[1] = 0;
- if (td->td_retval[1] == 1)
- td->td_retval[0] = 0;
error = linux_proc_init(td, td->td_retval[0], 0);
if (error)
return (error);
@@ -106,13 +102,10 @@ linux_vfork(struct thread *td, struct li
/* Exclude RFPPWAIT */
if ((error = fork1(td, RFFDG | RFPROC | RFMEM | RFSTOPPED, 0, &p2)) != 0)
return (error);
- if (error == 0) {
- td->td_retval[0] = p2->p_pid;
- td->td_retval[1] = 0;
- }
- /* Are we the child? */
- if (td->td_retval[1] == 1)
- td->td_retval[0] = 0;
+
+ td->td_retval[0] = p2->p_pid;
+ td->td_retval[1] = 0;
+
error = linux_proc_init(td, td->td_retval[0], 0);
if (error)
return (error);
More information about the svn-src-stable
mailing list