summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
87b69d5)
b=14947
i=shengyang
Use num_possible_cpus instead of NR_CPUS.
+ sbi->s_mb_order2_reqs = MB_DEFAULT_ORDER2_REQS;
+ sbi->s_mb_history_filter = EXT3_MB_HISTORY_DEFAULT;
+
+ 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);
+ sbi->s_locality_groups = kmalloc(i, GFP_NOFS);
+ if (sbi->s_locality_groups == NULL) {
+ clear_opt(sbi->s_mount_opt, MBALLOC);
+ kfree(sbi->s_mb_maxs);
+ return -ENOMEM;
+ }
+ 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);
+ struct ext3_locality_group *lg;
+ lg = &sbi->s_locality_groups[i];
+ sema_init(&lg->lg_sem, 1);