summaryrefslogtreecommitdiffstats
path: root/module/spl
diff options
context:
space:
mode:
authorPrakash Surya <[email protected]>2012-08-22 12:30:59 -0700
committerBrian Behlendorf <[email protected]>2012-08-23 10:01:20 -0700
commit9baf44bc17ddbc01dae4feacda32e04aac73f730 (patch)
tree031aadaba30c8818ddf03c5925ae4e76e703b8d1 /module/spl
parent039bae18ca3037124cd99384e782e3a2dc3e13f7 (diff)
Wrap trace_set_debug_header in trace_[get|put]_tcd
To properly support CONFIG_PREEMPT enabled kernels, we must refrain from using a CPU index when preemption is enabled. As a result, this change moves the trace_set_debug_header call (which calls smp_processor_id) within trace_get_tcd and trace_put_tcd (which disable and enable preemption respectively). Signed-off-by: Prakash Surya <[email protected]> Signed-off-by: Brian Behlendorf <[email protected]> Closes #160
Diffstat (limited to 'module/spl')
-rw-r--r--module/spl/spl-debug.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/module/spl/spl-debug.c b/module/spl/spl-debug.c
index 4bcc34a8e..0dd59db56 100644
--- a/module/spl/spl-debug.c
+++ b/module/spl/spl-debug.c
@@ -686,9 +686,8 @@ spl_debug_msg(void *arg, int subsys, int mask, const char *file,
if (strchr(file, '/'))
file = strrchr(file, '/') + 1;
- trace_set_debug_header(&header, subsys, mask, line, 0);
-
tcd = trace_get_tcd();
+ trace_set_debug_header(&header, subsys, mask, line, 0);
if (tcd == NULL)
goto console;