Thread (16 messages) 16 messages, 2 authors, 2026-01-30

Re: [PATCH v5 2/4] tracing: Make the backup instance non-reusable

From: Masami Hiramatsu (Google) <mhiramat@kernel.org>
Date: 2026-01-30 09:01:38
Also in: lkml

On Thu, 29 Jan 2026 14:53:33 -0500
Steven Rostedt [off-list ref] wrote:
On Wed, 28 Jan 2026 09:09:56 +0900
"Masami Hiramatsu (Google)" [off-list ref] wrote:
quoted
@@ -9388,12 +9405,16 @@ static void
 tracing_init_tracefs_percpu(struct trace_array *tr, long cpu)
 {
 	struct dentry *d_percpu = tracing_dentry_percpu(tr, cpu);
+	umode_t writable_mode = TRACE_MODE_WRITE;
 	struct dentry *d_cpu;
 	char cpu_dir[30]; /* 30 characters should be more than enough */
 
 	if (!d_percpu)
 		return;
 
+	if (trace_array_is_readonly(tr))
+		writable_mode = TRACE_MODE_READ;
Hmm, writable_mode is set but not used?
Oops, good catch! I missed to update it.

Thanks!
Looks like you missed an update.

-- Steve
quoted
+
 	snprintf(cpu_dir, 30, "cpu%ld", cpu);
 	d_cpu = tracefs_create_dir(cpu_dir, d_percpu);
 	if (!d_cpu) {
@@ -9616,7 +9637,6 @@ struct dentry *trace_create_file(const char *name,
 	return ret;
 }

-- 
Masami Hiramatsu (Google) [off-list ref]
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help