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]