tracing: Use trace_iterator_reset() in tracing_read_pipe()

Currently tracing_read_pipe() open codes trace_iterator_reset(). Just have
it use trace_iterator_reset() instead.

Link: https://lkml.kernel.org/r/20211210202616.64d432d2@gandalf.local.homeSigned-off-by: default avatarSteven Rostedt (VMware) <rostedt@goodmis.org>
parent dba87967
...@@ -6731,10 +6731,9 @@ tracing_read_pipe(struct file *filp, char __user *ubuf, ...@@ -6731,10 +6731,9 @@ tracing_read_pipe(struct file *filp, char __user *ubuf,
cnt = PAGE_SIZE - 1; cnt = PAGE_SIZE - 1;
/* reset all but tr, trace, and overruns */ /* reset all but tr, trace, and overruns */
memset_startat(iter, 0, seq); trace_iterator_reset(iter);
cpumask_clear(iter->started); cpumask_clear(iter->started);
trace_seq_init(&iter->seq); trace_seq_init(&iter->seq);
iter->pos = -1;
trace_event_read_lock(); trace_event_read_lock();
trace_access_lock(iter->cpu_file); trace_access_lock(iter->cpu_file);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment