linux/fs/tracefs
Steven Rostedt (Google) f2f496370a eventfs: Remove "is_freed" union with rcu head
The eventfs_inode->is_freed was a union with the rcu_head with the
assumption that when it was on the srcu list the head would contain a
pointer which would make "is_freed" true. But that was a wrong assumption
as the rcu head is a single link list where the last element is NULL.

Instead, split the nr_entries integer so that "is_freed" is one bit and
the nr_entries is the next 31 bits. As there shouldn't be more than 10
(currently there's at most 5 to 7 depending on the config), this should
not be a problem.

Link: https://lkml.kernel.org/r/20231101172649.049758712@goodmis.org

Cc: stable@vger.kernel.org
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Ajay Kaher <akaher@vmware.com>
Fixes: 6394044955 ("eventfs: Implement eventfs lookup, read, open functions")
Reviewed-by: Masami Hiramatsu (Google) <mhiramat@kernel.org>
Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
2023-11-01 23:49:32 -04:00
..
event_inode.c eventfs: Remove "is_freed" union with rcu head 2023-11-01 23:49:32 -04:00
inode.c eventfs: Remove eventfs_file and just use eventfs_inode 2023-10-04 17:11:50 -04:00
internal.h eventfs: Remove "is_freed" union with rcu head 2023-11-01 23:49:32 -04:00
Makefile eventfs: Implement eventfs dir creation functions 2023-07-30 18:13:33 -04:00