patch-1.3.28 linux/kernel/info.c

Next file: linux/kernel/sched.c
Previous file: linux/kernel/fork.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v1.3.27/linux/kernel/info.c linux/kernel/info.c
@@ -18,7 +18,6 @@
 {
 	int error;
 	struct sysinfo val;
-	struct task_struct **p;
 
 	error = verify_area(VERIFY_WRITE, info, sizeof(struct sysinfo));
 	if (error)
@@ -31,8 +30,7 @@
 	val.loads[1] = avenrun[1] << (SI_LOAD_SHIFT - FSHIFT);
 	val.loads[2] = avenrun[2] << (SI_LOAD_SHIFT - FSHIFT);
 
-	for (p = &LAST_TASK; p > &FIRST_TASK; p--)
-		if (*p) val.procs++;
+	val.procs = nr_tasks-1;
 
 	si_meminfo(&val);
 	si_swapinfo(&val);

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov with Sam's (original) version
of this