Signed-off-by: Andrew Morton --- 25-akpm/mm/page_alloc.c | 11 ++++++----- 1 files changed, 6 insertions(+), 5 deletions(-) diff -puN mm/page_alloc.c~collect-page_states-only-from-online-cpus-tidy mm/page_alloc.c --- 25/mm/page_alloc.c~collect-page_states-only-from-online-cpus-tidy Fri Dec 17 14:44:24 2004 +++ 25-akpm/mm/page_alloc.c Fri Dec 17 14:45:52 2004 @@ -1808,11 +1808,13 @@ struct seq_operations vmstat_op = { static int page_alloc_cpu_notify(struct notifier_block *self, unsigned long action, void *hcpu) { - int i, cpu = (unsigned long)hcpu; + int cpu = (unsigned long)hcpu; long *count; unsigned long *src, *dest; if (action == CPU_DEAD) { + int i; + /* Drain local pagecache count. */ count = &per_cpu(nr_pagecache_local, cpu); atomic_add(*count, &nr_pagecache); @@ -1824,12 +1826,11 @@ static int page_alloc_cpu_notify(struct dest = (unsigned long *)&__get_cpu_var(page_states); src = (unsigned long *)&per_cpu(page_states, cpu); - i = sizeof(struct page_state) / sizeof(unsigned long); - do { - i--; + for (i = 0; i < sizeof(struct page_state)/sizeof(unsigned long); + i++) { dest[i] += src[i]; src[i] = 0; - } while (i > 0); + } local_irq_enable(); } _