patch-2.2.4 linux/kernel/fork.c

Next file: linux/kernel/ksyms.c
Previous file: linux/kernel/exit.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.2.3/linux/kernel/fork.c linux/kernel/fork.c
@@ -510,6 +510,7 @@
 	down(&current->mm->mmap_sem);
 	lock_kernel();
 
+	retval = -EAGAIN;
 	if (p->user) {
 		if (atomic_read(&p->user->count) >= p->rlim[RLIMIT_NPROC].rlim_cur)
 			goto bad_fork_free;
@@ -518,7 +519,6 @@
 	{
 		struct task_struct **tslot;
 		tslot = find_empty_process();
-		retval = -EAGAIN;
 		if (!tslot)
 			goto bad_fork_free;
 		p->tarray_ptr = tslot;

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)