@@ -73,7 +73,8 @@ static struct tracer_flags dummy_tracer_flags = {
7373 .opts = dummy_tracer_opt
7474};
7575
76- static int dummy_set_flag (u32 old_flags , u32 bit , int set )
76+ static int
77+ dummy_set_flag (struct trace_array * tr , u32 old_flags , u32 bit , int set )
7778{
7879 return 0 ;
7980}
@@ -3339,13 +3340,14 @@ static int tracing_trace_options_show(struct seq_file *m, void *v)
33393340 return 0 ;
33403341}
33413342
3342- static int __set_tracer_option (struct tracer * trace ,
3343+ static int __set_tracer_option (struct trace_array * tr ,
33433344 struct tracer_flags * tracer_flags ,
33443345 struct tracer_opt * opts , int neg )
33453346{
3347+ struct tracer * trace = tr -> current_trace ;
33463348 int ret ;
33473349
3348- ret = trace -> set_flag (tracer_flags -> val , opts -> bit , !neg );
3350+ ret = trace -> set_flag (tr , tracer_flags -> val , opts -> bit , !neg );
33493351 if (ret )
33503352 return ret ;
33513353
@@ -3357,8 +3359,9 @@ static int __set_tracer_option(struct tracer *trace,
33573359}
33583360
33593361/* Try to assign a tracer specific option */
3360- static int set_tracer_option (struct tracer * trace , char * cmp , int neg )
3362+ static int set_tracer_option (struct trace_array * tr , char * cmp , int neg )
33613363{
3364+ struct tracer * trace = tr -> current_trace ;
33623365 struct tracer_flags * tracer_flags = trace -> flags ;
33633366 struct tracer_opt * opts = NULL ;
33643367 int i ;
@@ -3367,8 +3370,7 @@ static int set_tracer_option(struct tracer *trace, char *cmp, int neg)
33673370 opts = & tracer_flags -> opts [i ];
33683371
33693372 if (strcmp (cmp , opts -> name ) == 0 )
3370- return __set_tracer_option (trace , trace -> flags ,
3371- opts , neg );
3373+ return __set_tracer_option (tr , trace -> flags , opts , neg );
33723374 }
33733375
33743376 return - EINVAL ;
@@ -3440,7 +3442,7 @@ static int trace_set_options(struct trace_array *tr, char *option)
34403442
34413443 /* If no option could be set, test the specific tracer options */
34423444 if (!trace_options [i ])
3443- ret = set_tracer_option (tr -> current_trace , cmp , neg );
3445+ ret = set_tracer_option (tr , cmp , neg );
34443446
34453447 mutex_unlock (& trace_types_lock );
34463448
@@ -5689,7 +5691,7 @@ trace_options_write(struct file *filp, const char __user *ubuf, size_t cnt,
56895691
56905692 if (!!(topt -> flags -> val & topt -> opt -> bit ) != val ) {
56915693 mutex_lock (& trace_types_lock );
5692- ret = __set_tracer_option (topt -> tr -> current_trace , topt -> flags ,
5694+ ret = __set_tracer_option (topt -> tr , topt -> flags ,
56935695 topt -> opt , !val );
56945696 mutex_unlock (& trace_types_lock );
56955697 if (ret )
0 commit comments