minor patch for 2.1.80 kernel/fork.c

Bill Hawes (whawes@star.net)
Wed, 21 Jan 1998 11:55:42 -0500


This is a multi-part message in MIME format.
--------------9DBD6EC1AC3F774AC8B21C60
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit

The attached patch fixes a warning message when compiling without SMP.

Regards,
Bill
--------------9DBD6EC1AC3F774AC8B21C60
Content-Type: text/plain; charset=us-ascii; name="fork_80-patch"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline; filename="fork_80-patch"

--- kernel/fork.c.old Tue Jan 20 23:55:33 1998
+++ kernel/fork.c Wed Jan 21 12:26:37 1998
@@ -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;

--------------9DBD6EC1AC3F774AC8B21C60--