Skip to content

Commit

Permalink
tracing: Use trace_iterator_reset() in tracing_read_pipe()
Browse files Browse the repository at this point in the history
Currently tracing_read_pipe() open codes trace_iterator_reset(). Just have
it use trace_iterator_reset() instead.

Link: https://lkml.kernel.org/r/[email protected]

Signed-off-by: Steven Rostedt (VMware) <[email protected]>
  • Loading branch information
rostedt committed Dec 11, 2021
1 parent dba8796 commit 2768c1e
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions kernel/trace/trace.c
Original file line number Diff line number Diff line change
Expand Up @@ -6731,10 +6731,9 @@ tracing_read_pipe(struct file *filp, char __user *ubuf,
cnt = PAGE_SIZE - 1;

/* reset all but tr, trace, and overruns */
memset_startat(iter, 0, seq);
trace_iterator_reset(iter);
cpumask_clear(iter->started);
trace_seq_init(&iter->seq);
iter->pos = -1;

trace_event_read_lock();
trace_access_lock(iter->cpu_file);
Expand Down

0 comments on commit 2768c1e

Please sign in to comment.