

Signed-off-by: Andrew Morton <akpm@osdl.org>
---

 25-akpm/kernel/acct.c |   15 +++++++--------
 25-akpm/mm/memory.c   |   14 ++++++--------
 2 files changed, 13 insertions(+), 16 deletions(-)

diff -puN kernel/acct.c~enhanced-memory-accounting-data-collection-tidy kernel/acct.c
--- 25/kernel/acct.c~enhanced-memory-accounting-data-collection-tidy	2004-11-18 23:47:01.844390328 -0800
+++ 25-akpm/kernel/acct.c	2004-11-18 23:47:01.850389416 -0800
@@ -536,18 +536,17 @@ void acct_process(long exitcode)
  */
 void acct_update_integrals(void)
 {
-	long delta;
-	struct task_struct *parent = current;
+	struct task_struct *tsk = current;
 
-	if (parent->mm) {
-		delta = parent->stime - parent->acct_stimexpd;
-		parent->acct_stimexpd = parent->stime;
-		parent->acct_rss_mem1 += delta * parent->mm->rss;
-		parent->acct_vm_mem1 += delta * parent->mm->total_vm;
+	if (likely(tsk->mm)) {
+		long delta = tsk->stime - tsk->acct_stimexpd;
+
+		tsk->acct_stimexpd = tsk->stime;
+		tsk->acct_rss_mem1 += delta * tsk->mm->rss;
+		tsk->acct_vm_mem1 += delta * tsk->mm->total_vm;
 	}
 }
 
-
 /*
  * acct_clear_integrals
  *    - clear the mm integral fields in task_struct
diff -puN mm/memory.c~enhanced-memory-accounting-data-collection-tidy mm/memory.c
--- 25/mm/memory.c~enhanced-memory-accounting-data-collection-tidy	2004-11-18 23:47:01.846390024 -0800
+++ 25-akpm/mm/memory.c	2004-11-18 23:47:01.851389264 -0800
@@ -2071,15 +2071,13 @@ EXPORT_SYMBOL(vmalloc_to_pfn);
  */
 void update_mem_hiwater(void)
 {
-	struct task_struct *parent = current;
+	struct task_struct *tsk = current;
 
-	if (parent->mm) {
-		if (parent->mm->hiwater_rss < parent->mm->rss) {
-			parent->mm->hiwater_rss = parent->mm->rss;
-		}
-		if (parent->mm->hiwater_vm < parent->mm->total_vm) {
-			parent->mm->hiwater_vm = parent->mm->total_vm;
-		}
+	if (likely(tsk->mm)) {
+		if (tsk->mm->hiwater_rss < tsk->mm->rss)
+			tsk->mm->hiwater_rss = tsk->mm->rss;
+		if (tsk->mm->hiwater_vm < tsk->mm->total_vm)
+			tsk->mm->hiwater_vm = tsk->mm->total_vm;
 	}
 }
 
_
