mirror of
https://github.com/torvalds/linux.git
synced 2026-06-06 21:45:45 +02:00
tracing: Simplify conditional compilation code in tracing_set_tracer()
[ Upstream commitf4b0d31809] Two conditional compilation directives "#ifdef CONFIG_TRACER_MAX_TRACE" are used consecutively, and no other code in between. Simplify conditional the compilation code and only use one "#ifdef CONFIG_TRACER_MAX_TRACE". Link: https://lkml.kernel.org/r/20220602140613.545069-1-sunliming@kylinos.cn Signed-off-by: sunliming <sunliming@kylinos.cn> Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org> Stable-dep-of:a541a9559b("tracing: Do not free snapshot if tracer is on cmdline") Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
parent
4e3a15ca24
commit
bd6af07e79
|
|
@ -6025,9 +6025,7 @@ int tracing_set_tracer(struct trace_array *tr, const char *buf)
|
||||||
synchronize_rcu();
|
synchronize_rcu();
|
||||||
free_snapshot(tr);
|
free_snapshot(tr);
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef CONFIG_TRACER_MAX_TRACE
|
|
||||||
if (t->use_max_tr && !had_max_tr) {
|
if (t->use_max_tr && !had_max_tr) {
|
||||||
ret = tracing_alloc_snapshot_instance(tr);
|
ret = tracing_alloc_snapshot_instance(tr);
|
||||||
if (ret < 0)
|
if (ret < 0)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user