eventfs: Stop using dcache_readdir() for getdents()
authorSteven Rostedt (Google) <rostedt@goodmis.org>
Thu, 4 Jan 2024 01:52:49 +0000 (20:52 -0500)
committerSteven Rostedt (Google) <rostedt@goodmis.org>
Thu, 4 Jan 2024 02:53:25 +0000 (21:53 -0500)
commit493ec81a8fb8e4ada6f223b8b73791a1280d4774
tree0b72ae103535141f26bd053c27c2dd42fa1e998a
parentb0f7e2d739b4aac131ea1662d086a07775097b05
eventfs: Stop using dcache_readdir() for getdents()

The eventfs creates dynamically allocated dentries and inodes. Using the
dcache_readdir() logic for its own directory lookups requires hiding the
cursor of the dcache logic and playing games to allow the dcache_readdir()
to still have access to the cursor while the eventfs saved what it created
and what it needs to release.

Instead, just have eventfs have its own iterate_shared callback function
that will fill in the dent entries. This simplifies the code quite a bit.

Link: https://lore.kernel.org/linux-trace-kernel/20240104015435.682218477@goodmis.org
Cc: Masami Hiramatsu <mhiramat@kernel.org>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Ajay Kaher <akaher@vmware.com>
Cc: Al Viro <viro@ZenIV.linux.org.uk>
Cc: Christian Brauner <brauner@kernel.org>
Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
fs/tracefs/event_inode.c