[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20260211114538.577122c8@fedora>
Date: Wed, 11 Feb 2026 11:45:38 -0500
From: Steven Rostedt <rostedt@...dmis.org>
To: Petr Pavlu <petr.pavlu@...e.com>
Cc: Masami Hiramatsu <mhiramat@...nel.org>, Mathieu Desnoyers
<mathieu.desnoyers@...icios.com>, Tom Zanussi <zanussi@...nel.org>,
linux-kernel@...r.kernel.org, linux-trace-kernel@...r.kernel.org
Subject: Re: [PATCH 4/5] tracing: Clean up access to trace_event_file from a
file pointer
On Tue, 10 Feb 2026 12:28:19 +0100
Petr Pavlu <petr.pavlu@...e.com> wrote:
> In the past, when removing an event directory in remove_event_file_dir(),
> the code set i_private to NULL for all event files and readers were
> expected to check for this state to recognize that the event is being
> removed. In the case of event_id_read(), the value was read using
> event_file_data() without acquiring the event_mutex. This required
> event_file_data() to use READ_ONCE() when retrieving the i_private data.
I'm OK with this change. Instead of removing the event_file_data() like
you did from event_id_read(), just open code it there. The id is
simple, let's keep it that way.
That is, something like:
int id = (long)READ_ONCE(file_inode(filp)->i_private);
Feel free to add comments to explain it.
Thanks,
-- Steve
Powered by blists - more mailing lists