aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--kernel/trace/trace.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c
index 7dcd67332f57..801d72b84a2a 100644
--- a/kernel/trace/trace.c
+++ b/kernel/trace/trace.c
@@ -2973,7 +2973,6 @@ int tracing_open_generic_tr(struct inode *inode, struct file *filp)
2973 filp->private_data = inode->i_private; 2973 filp->private_data = inode->i_private;
2974 2974
2975 return 0; 2975 return 0;
2976
2977} 2976}
2978 2977
2979int tracing_open_generic_tc(struct inode *inode, struct file *filp) 2978int tracing_open_generic_tc(struct inode *inode, struct file *filp)
@@ -5277,14 +5276,14 @@ static ssize_t
5277tracing_stats_read(struct file *filp, char __user *ubuf, 5276tracing_stats_read(struct file *filp, char __user *ubuf,
5278 size_t count, loff_t *ppos) 5277 size_t count, loff_t *ppos)
5279{ 5278{
5280 struct trace_cpu *tc = filp->private_data; 5279 struct inode *inode = file_inode(filp);
5281 struct trace_array *tr = tc->tr; 5280 struct trace_array *tr = inode->i_private;
5282 struct trace_buffer *trace_buf = &tr->trace_buffer; 5281 struct trace_buffer *trace_buf = &tr->trace_buffer;
5282 int cpu = tracing_get_cpu(inode);
5283 struct trace_seq *s; 5283 struct trace_seq *s;
5284 unsigned long cnt; 5284 unsigned long cnt;
5285 unsigned long long t; 5285 unsigned long long t;
5286 unsigned long usec_rem; 5286 unsigned long usec_rem;
5287 int cpu = tc->cpu;
5288 5287
5289 s = kmalloc(sizeof(*s), GFP_KERNEL); 5288 s = kmalloc(sizeof(*s), GFP_KERNEL);
5290 if (!s) 5289 if (!s)
@@ -5337,10 +5336,10 @@ tracing_stats_read(struct file *filp, char __user *ubuf,
5337} 5336}
5338 5337
5339static const struct file_operations tracing_stats_fops = { 5338static const struct file_operations tracing_stats_fops = {
5340 .open = tracing_open_generic_tc, 5339 .open = tracing_open_generic_tr,
5341 .read = tracing_stats_read, 5340 .read = tracing_stats_read,
5342 .llseek = generic_file_llseek, 5341 .llseek = generic_file_llseek,
5343 .release = tracing_release_generic_tc, 5342 .release = tracing_release_generic_tr,
5344}; 5343};
5345 5344
5346#ifdef CONFIG_DYNAMIC_FTRACE 5345#ifdef CONFIG_DYNAMIC_FTRACE
@@ -5570,7 +5569,7 @@ tracing_init_debugfs_percpu(struct trace_array *tr, long cpu)
5570 tr, cpu, &tracing_buffers_fops); 5569 tr, cpu, &tracing_buffers_fops);
5571 5570
5572 trace_create_cpu_file("stats", 0444, d_cpu, 5571 trace_create_cpu_file("stats", 0444, d_cpu,
5573 &data->trace_cpu, cpu, &tracing_stats_fops); 5572 tr, cpu, &tracing_stats_fops);
5574 5573
5575 trace_create_cpu_file("buffer_size_kb", 0444, d_cpu, 5574 trace_create_cpu_file("buffer_size_kb", 0444, d_cpu,
5576 &data->trace_cpu, cpu, &tracing_entries_fops); 5575 &data->trace_cpu, cpu, &tracing_entries_fops);