patch-2.1.81 linux/kernel/fork.c

Next file: linux/kernel/printk.c
Previous file: linux/kernel/acct.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.1.80/linux/kernel/fork.c linux/kernel/fork.c
@@ -437,7 +437,6 @@
  */
 int do_fork(unsigned long clone_flags, unsigned long usp, struct pt_regs *regs)
 {
-        int i;
 	int nr;
 	int error = -ENOMEM;
 	struct task_struct *p;
@@ -483,11 +482,14 @@
 	p->times.tms_utime = p->times.tms_stime = 0;
 	p->times.tms_cutime = p->times.tms_cstime = 0;
 #ifdef __SMP__
-	p->has_cpu = 0;
-	p->processor = NO_PROC_ID;
-	/* ?? should we just memset this ?? */
-	for(i = 0; i < smp_num_cpus; i++)
-		p->per_cpu_utime[i] = p->per_cpu_stime[i] = 0;
+	{
+		int i;
+		p->has_cpu = 0;
+		p->processor = NO_PROC_ID;
+		/* ?? should we just memset this ?? */
+		for(i = 0; i < smp_num_cpus; i++)
+			p->per_cpu_utime[i] = p->per_cpu_stime[i] = 0;
+	}
 #endif
 	p->lock_depth = 0;
 	p->start_time = jiffies;

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov