diff options
author | Steven Rostedt (Google) <rostedt@goodmis.org> | 2023-01-05 16:52:51 -0500 |
---|---|---|
committer | Steven Rostedt (Google) <rostedt@goodmis.org> | 2023-01-06 18:57:42 -0500 |
commit | cfe573a5f506dd6223de8047f2db5ee3b8026552 (patch) | |
tree | f00fa27634d171b144b7a19a12302c23fcd96e83 | |
parent | c4bc5d7bc130a3fb837c880e0a57a8b70ae82ae5 (diff) | |
download | libtracefs-cfe573a5f506dd6223de8047f2db5ee3b8026552.tar.gz |
libtracefs: Have tracefs_cpu_stop() do nothing only with PERM_NONBLOCK
As NONBLOCK can be set temporarily, if that's the state do not skip trying
to wake up the reader if its set. It may still need a kick.
Link: https://lore.kernel.org/linux-trace-devel/20230105215252.224044-2-rostedt@goodmis.org
Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
-rw-r--r-- | src/tracefs-record.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/tracefs-record.c b/src/tracefs-record.c index 459c346..b078c86 100644 --- a/src/tracefs-record.c +++ b/src/tracefs-record.c @@ -421,7 +421,7 @@ int tracefs_cpu_stop(struct tracefs_cpu *tcpu) { int ret = 1; - if (tcpu->flags & TC_NONBLOCK) + if (tcpu->flags & TC_PERM_NONBLOCK) return 0; ret = write(tcpu->ctrl_pipe[1], &ret, 1); |