On Tue, 10 Feb 2026 12:28:19 +0100
Petr Pavlu <[email protected]> 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

Reply via email to