@@ -1772,7 +1772,7 @@ static void trace_create_maxlat_file(struct trace_array *tr,
1772
1772
init_irq_work (& tr -> fsnotify_irqwork , latency_fsnotify_workfn_irq );
1773
1773
tr -> d_max_latency = trace_create_file ("tracing_max_latency" ,
1774
1774
TRACE_MODE_WRITE ,
1775
- d_tracer , & tr -> max_latency ,
1775
+ d_tracer , tr ,
1776
1776
& tracing_max_lat_fops );
1777
1777
}
1778
1778
@@ -1805,7 +1805,7 @@ void latency_fsnotify(struct trace_array *tr)
1805
1805
1806
1806
#define trace_create_maxlat_file (tr , d_tracer ) \
1807
1807
trace_create_file("tracing_max_latency", TRACE_MODE_WRITE, \
1808
- d_tracer, &tr->max_latency , &tracing_max_lat_fops)
1808
+ d_tracer, tr , &tracing_max_lat_fops)
1809
1809
1810
1810
#endif
1811
1811
@@ -6717,14 +6717,18 @@ static ssize_t
6717
6717
tracing_max_lat_read (struct file * filp , char __user * ubuf ,
6718
6718
size_t cnt , loff_t * ppos )
6719
6719
{
6720
- return tracing_nsecs_read (filp -> private_data , ubuf , cnt , ppos );
6720
+ struct trace_array * tr = filp -> private_data ;
6721
+
6722
+ return tracing_nsecs_read (& tr -> max_latency , ubuf , cnt , ppos );
6721
6723
}
6722
6724
6723
6725
static ssize_t
6724
6726
tracing_max_lat_write (struct file * filp , const char __user * ubuf ,
6725
6727
size_t cnt , loff_t * ppos )
6726
6728
{
6727
- return tracing_nsecs_write (filp -> private_data , ubuf , cnt , ppos );
6729
+ struct trace_array * tr = filp -> private_data ;
6730
+
6731
+ return tracing_nsecs_write (& tr -> max_latency , ubuf , cnt , ppos );
6728
6732
}
6729
6733
6730
6734
#endif
@@ -7778,10 +7782,11 @@ static const struct file_operations tracing_thresh_fops = {
7778
7782
7779
7783
#ifdef CONFIG_TRACER_MAX_TRACE
7780
7784
static const struct file_operations tracing_max_lat_fops = {
7781
- .open = tracing_open_generic ,
7785
+ .open = tracing_open_generic_tr ,
7782
7786
.read = tracing_max_lat_read ,
7783
7787
.write = tracing_max_lat_write ,
7784
7788
.llseek = generic_file_llseek ,
7789
+ .release = tracing_release_generic_tr ,
7785
7790
};
7786
7791
#endif
7787
7792
0 commit comments