From 71bf012b077f86f2e15e25274950e68f62ed81fc Mon Sep 17 00:00:00 2001 From: yangsheng <yangsheng> Date: Thu, 6 Mar 2008 04:13:24 +0000 Subject: [PATCH] Branch b1_6 b=14947 i=shengyang Use num_possible_cpus instead of NR_CPUS. --- ldiskfs/kernel_patches/patches/ext3-mballoc3-core.patch | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ldiskfs/kernel_patches/patches/ext3-mballoc3-core.patch b/ldiskfs/kernel_patches/patches/ext3-mballoc3-core.patch index b199182dae..f1d9bd61be 100644 --- a/ldiskfs/kernel_patches/patches/ext3-mballoc3-core.patch +++ b/ldiskfs/kernel_patches/patches/ext3-mballoc3-core.patch @@ -2600,7 +2600,7 @@ Index: linux-2.6.9-full/fs/ext3/mballoc.c + sbi->s_mb_order2_reqs = MB_DEFAULT_ORDER2_REQS; + sbi->s_mb_history_filter = EXT3_MB_HISTORY_DEFAULT; + -+ i = sizeof(struct ext3_locality_group) * NR_CPUS; ++ i = sizeof(struct ext3_locality_group) * num_possible_cpus(); + sbi->s_locality_groups = kmalloc(i, GFP_NOFS); + if (sbi->s_locality_groups == NULL) { + clear_opt(sbi->s_mount_opt, MBALLOC); @@ -2608,7 +2608,7 @@ Index: linux-2.6.9-full/fs/ext3/mballoc.c + kfree(sbi->s_mb_maxs); + return -ENOMEM; + } -+ for (i = 0; i < NR_CPUS; i++) { ++ for (i = 0; i < num_possible_cpus(); i++) { + struct ext3_locality_group *lg; + lg = &sbi->s_locality_groups[i]; + sema_init(&lg->lg_sem, 1); -- GitLab