Unusual code in mballoc.c.
Hi all,
A grep lead me to fs/ext4/mballoc.c:
Line 2551:
for (i = 0; i < nr_cpu_ids; i++) {This is more normally "for_each_possible_cpu(i)".
Line 4097:
ac->ac_lg = &sbi->s_locality_groups[get_cpu()]; put_cpu();
This is presumably someone suppressing a warning. It should be:
ac->ac_lg = &sbi->s_locality_groups[raw_smp_processor_id()];
Thanks,
Rusty.
Quoted 10 lines · Rusty Russell
Hi all,
A grep lead me to
fs/ext4/mballoc.c:Line 2551:
for (i = 0; i < nr_cpu_ids; i++) {This is more normally "
for_each_possible_cpu(i)".Line 4097:
Quoted 8 lines
ac->ac_lg = &sbi->s_locality_groups[get_cpu()]; put_cpu();This is presumably someone suppressing a warning. It should be:
ac->ac_lg = &sbi->s_locality_groups[raw_smp_processor_id()];Thanks,
Rusty.
Hi Rusty - I sent a patch for this a while back...
Thanks,
-Eric