patch for applying patch-3.0.17-vs2.3.2.1.diff to linux-3.0.18

Corey Wright <[email protected]>
Newsgroups gmane.linux.vserver
Message-ID <[email protected]>
attached is my proposed patch to fix the rejects when applying
patch-3.0.17-vs2.3.2.1.diff to linux-3.0.18 (fs/proc/uptime.c & Makefile).

1. apply patch-3.0.17-vs2.3.2.1.diff
2. delete rejects
 a. fs/proc/uptime.c.rej
 b. Makefile.rej
3. apply patch-3.0.17-18-vs2.3.2.1.diff

please review and provide feedback (accept or reject).

thanks!

corey
--
[email protected]
patch-3.0.17-18-vs2.3.2.1.diff (text/x-diff, 1.6 KB)
diff -urNpd linux-3.0.18-vs2.3.2.1-rejects/fs/proc/uptime.c linux-3.0.18-vs2.3.2.1/fs/proc/uptime.c
--- linux-3.0.18-vs2.3.2.1-rejects/fs/proc/uptime.c	2012-01-25 23:59:50.000000000 -0600
+++ linux-3.0.18-vs2.3.2.1/fs/proc/uptime.c	2012-01-26 00:07:58.000000000 -0600
@@ -4,7 +4,7 @@
 #include <linux/sched.h>
 #include <linux/seq_file.h>
 #include <linux/time.h>
-#include <linux/kernel_stat.h>
+#include <linux/vserver/cvirt.h>
 #include <asm/cputime.h>
 
 static int uptime_proc_show(struct seq_file *m, void *v)
@@ -14,17 +14,18 @@ static int uptime_proc_show(struct seq_f
 	cputime64_t idletime;
 	u64 nsec;
 	u32 rem;
-	int i;
 
-	idletime = 0;
-	for_each_possible_cpu(i)
-		idletime = cputime64_add(idletime, kstat_cpu(i).cpustat.idle);
+	idletime = cputime_add(init_task.utime, init_task.stime);
 
 	do_posix_clock_monotonic_gettime(&uptime);
 	monotonic_to_bootbased(&uptime);
 	nsec = cputime64_to_jiffies64(idletime) * TICK_NSEC;
 	idle.tv_sec = div_u64_rem(nsec, NSEC_PER_SEC, &rem);
 	idle.tv_nsec = rem;
+
+	if (vx_flags(VXF_VIRT_UPTIME, 0))
+		vx_vsi_uptime(&uptime, &idle);
+
 	seq_printf(m, "%lu.%02lu %lu.%02lu\n",
 			(unsigned long) uptime.tv_sec,
 			(uptime.tv_nsec / (NSEC_PER_SEC / 100)),
diff -urNpd linux-3.0.18-vs2.3.2.1-rejects/Makefile linux-3.0.18-vs2.3.2.1/Makefile
--- linux-3.0.18-vs2.3.2.1-rejects/Makefile	2012-01-25 23:59:49.000000000 -0600
+++ linux-3.0.18-vs2.3.2.1/Makefile	2012-01-25 23:42:44.000000000 -0600
@@ -1,7 +1,7 @@
 VERSION = 3
 PATCHLEVEL = 0
 SUBLEVEL = 18
-EXTRAVERSION =
+EXTRAVERSION = -vs2.3.2.1
 NAME = Sneaky Weasel
 
 # *DOCUMENTATION*
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.