diff mbox series

[1/2] libtracefs: Have tracefs_cpu_stop() do nothing only with PERM_NONBLOCK

Message ID 20230105215252.224044-2-rostedt@goodmis.org (mailing list archive)
State Accepted
Commit cfe573a5f506dd6223de8047f2db5ee3b8026552
Headers show
Series libtracefs: Fixups to tracefs_cpu_stop() | expand

Commit Message

Steven Rostedt Jan. 5, 2023, 9:52 p.m. UTC
From: "Steven Rostedt (Google)" <rostedt@goodmis.org>

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.

Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
---
 src/tracefs-record.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/src/tracefs-record.c b/src/tracefs-record.c
index 428bec0dfe3d..f998883134b8 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);