}
 
        /* If trace pipe files are being read, we can't change the tracer */
-       if (tr->current_trace->ref) {
+       if (tr->trace_ref) {
                ret = -EBUSY;
                goto out;
        }
 
        nonseekable_open(inode, filp);
 
-       tr->current_trace->ref++;
+       tr->trace_ref++;
 out:
        mutex_unlock(&trace_types_lock);
        return ret;
 
        mutex_lock(&trace_types_lock);
 
-       tr->current_trace->ref--;
+       tr->trace_ref--;
 
        if (iter->trace->pipe_close)
                iter->trace->pipe_close(iter);
 
        filp->private_data = info;
 
-       tr->current_trace->ref++;
+       tr->trace_ref++;
 
        mutex_unlock(&trace_types_lock);
 
 
        mutex_lock(&trace_types_lock);
 
-       iter->tr->current_trace->ref--;
+       iter->tr->trace_ref--;
 
        __trace_array_put(iter->tr);
 
        int i;
 
        /* Reference counter for a newly created trace array = 1. */
-       if (tr->ref > 1 || (tr->current_trace && tr->current_trace->ref))
+       if (tr->ref > 1 || (tr->current_trace && tr->trace_ref))
                return -EBUSY;
 
        list_del(&tr->list);
 
        struct trace_event_file *trace_marker_file;
        cpumask_var_t           tracing_cpumask; /* only trace on set CPUs */
        int                     ref;
+       int                     trace_ref;
 #ifdef CONFIG_FUNCTION_TRACER
        struct ftrace_ops       *ops;
        struct trace_pid_list   __rcu *function_pids;
        struct tracer           *next;
        struct tracer_flags     *flags;
        int                     enabled;
-       int                     ref;
        bool                    print_max;
        bool                    allow_instances;
 #ifdef CONFIG_TRACER_MAX_TRACE