On Thu, 27 Jun 2019 21:02:31 -0400
Steven Rostedt <[email protected]> wrote:

> > +++ b/kernel/trace/trace.c
> > @@ -7126,12 +7126,24 @@ static ssize_t tracing_err_log_write(struct file 
> > *file,
> >     return count;
> >  }
> >  
> > +static int tracing_err_log_release(struct inode *inode, struct file *file)
> > +{
> > +   struct trace_array *tr = inode->i_private;
> > +
> > +   trace_array_put(tr);
> > +
> > +   if (file->private_data)

Actually, I think it is safer to have the condition be:

        if (file->f_mode & FMODE_READ)

As that would match the open.

Takeshi,

Can you send a v2?

Thanks!

-- Steve

> > +           seq_release(inode, file);
> > +
> > +   return 0;
> > +}
> > +

Reply via email to