summaryrefslogtreecommitdiffstats
path: root/fs/file.c
diff options
context:
space:
mode:
authorEric Dumazet <dada1@cosmosbay.com>2006-02-04 23:27:36 -0800
committerLinus Torvalds <torvalds@g5.osdl.org>2006-02-05 11:06:51 -0800
commit88a2a4ac6b671a4b0dd5d2d762418904c05f4104 (patch)
tree8c30052a0d7fadec37c785a42a71b28d0a9c5fcf /fs/file.c
parentcef5076987dd545ac74f4efcf1c962be8eac34b0 (diff)
downloadop-kernel-dev-88a2a4ac6b671a4b0dd5d2d762418904c05f4104.zip
op-kernel-dev-88a2a4ac6b671a4b0dd5d2d762418904c05f4104.tar.gz
[PATCH] percpu data: only iterate over possible CPUs
percpu_data blindly allocates bootmem memory to store NR_CPUS instances of cpudata, instead of allocating memory only for possible cpus. As a preparation for changing that, we need to convert various 0 -> NR_CPUS loops to use for_each_cpu(). (The above only applies to users of asm-generic/percpu.h. powerpc has gone it alone and is presently only allocating memory for present CPUs, so it's currently corrupting memory). Signed-off-by: Eric Dumazet <dada1@cosmosbay.com> Cc: "David S. Miller" <davem@davemloft.net> Cc: James Bottomley <James.Bottomley@steeleye.com> Acked-by: Ingo Molnar <mingo@elte.hu> Cc: Jens Axboe <axboe@suse.de> Cc: Anton Blanchard <anton@samba.org> Acked-by: William Irwin <wli@holomorphy.com> Cc: Andi Kleen <ak@muc.de> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'fs/file.c')
-rw-r--r--fs/file.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/fs/file.c b/fs/file.c
index fd066b2..cea7cbe 100644
--- a/fs/file.c
+++ b/fs/file.c
@@ -379,7 +379,6 @@ static void __devinit fdtable_defer_list_init(int cpu)
void __init files_defer_init(void)
{
int i;
- /* Really early - can't use for_each_cpu */
- for (i = 0; i < NR_CPUS; i++)
+ for_each_cpu(i)
fdtable_defer_list_init(i);
}
OpenPOWER on IntegriCloud