mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-24 19:28:53 +03:00
Wrap smp_processor_id in kpreempt_[dis|en]able
After surveying the code, the few places where smp_processor_id is used were deemed to be safe to use with a preempt enabled kernel. As such, no core logic had to be changed. These smp_processor_id call sites are simply are wrapped in kpreempt_disable and kpreempt_enabled to prevent the Linux kernel from emitting scary warnings. Signed-off-by: Prakash Surya <surya1@llnl.gov> Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Richard Yao <ryao@cs.stonybrook.edu> Issue #83
This commit is contained in:
committed by
Brian Behlendorf
parent
52cd92022e
commit
15a9e03368
+7
-1
@@ -1413,7 +1413,13 @@ fm_ena_generate_cpu(uint64_t timestamp, processorid_t cpuid, uchar_t format)
|
||||
uint64_t
|
||||
fm_ena_generate(uint64_t timestamp, uchar_t format)
|
||||
{
|
||||
return (fm_ena_generate_cpu(timestamp, getcpuid(), format));
|
||||
uint64_t ena;
|
||||
|
||||
kpreempt_disable();
|
||||
ena = fm_ena_generate_cpu(timestamp, getcpuid(), format);
|
||||
kpreempt_enable();
|
||||
|
||||
return (ena);
|
||||
}
|
||||
|
||||
uint64_t
|
||||
|
||||
Reference in New Issue
Block a user