linux-stable/fs/tracefs
Ajay Kaher 5bdcd5f533 eventfs: Implement removal of meta data from eventfs
When events are removed from tracefs, the eventfs must be aware of this.
The eventfs_remove() removes the meta data from eventfs so that it will no
longer create the files associated with that event.

When an instance is removed from tracefs, eventfs_remove_events_dir() will
remove and clean up the entire "events" directory.

The helper function eventfs_remove_rec() is used to clean up and free the
associated data from eventfs for both of the added functions. SRCU is used
to protect the lists of meta data stored in the eventfs. The eventfs_mutex
is used to protect the content of the items in the list.

As lookups may be happening as deletions of events are made, the freeing
of dentry/inodes and relative information is done after the SRCU grace
period has passed.

Link: https://lkml.kernel.org/r/1690568452-46553-9-git-send-email-akaher@vmware.com

Signed-off-by: Ajay Kaher <akaher@vmware.com>
Co-developed-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
Tested-by: Ching-lin Yu <chinglinyu@google.com>
Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202305030611.Kas747Ev-lkp@intel.com/
Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
2023-07-30 18:13:34 -04:00
..
event_inode.c eventfs: Implement removal of meta data from eventfs 2023-07-30 18:13:34 -04:00
inode.c eventfs: Implement functions to create files and dirs when accessed 2023-07-30 18:13:34 -04:00
internal.h eventfs: Implement functions to create files and dirs when accessed 2023-07-30 18:13:34 -04:00
Makefile eventfs: Implement eventfs dir creation functions 2023-07-30 18:13:33 -04:00