eventfs: Restructure eventfs_inode structure to be more condensed
commit 264424dfdd
upstream.
Some of the eventfs_inode structure has holes in it. Rework the structure
to be a bit more condensed, and also remove the no longer used llist
field.
Link: https://lore.kernel.org/linux-trace-kernel/20240201161617.002321438@goodmis.org
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Masami Hiramatsu <mhiramat@kernel.org>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Cc: Christian Brauner <brauner@kernel.org>
Cc: Al Viro <viro@ZenIV.linux.org.uk>
Cc: Ajay Kaher <ajay.kaher@broadcom.com>
Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
5c3ea7dfef
commit
ed823ca4bc
@ -32,40 +32,37 @@ struct eventfs_attr {
|
|||||||
/*
|
/*
|
||||||
* struct eventfs_inode - hold the properties of the eventfs directories.
|
* struct eventfs_inode - hold the properties of the eventfs directories.
|
||||||
* @list: link list into the parent directory
|
* @list: link list into the parent directory
|
||||||
|
* @rcu: Union with @list for freeing
|
||||||
|
* @children: link list into the child eventfs_inode
|
||||||
* @entries: the array of entries representing the files in the directory
|
* @entries: the array of entries representing the files in the directory
|
||||||
* @name: the name of the directory to create
|
* @name: the name of the directory to create
|
||||||
* @children: link list into the child eventfs_inode
|
|
||||||
* @events_dir: the dentry of the events directory
|
* @events_dir: the dentry of the events directory
|
||||||
* @entry_attrs: Saved mode and ownership of the @d_children
|
* @entry_attrs: Saved mode and ownership of the @d_children
|
||||||
* @attr: Saved mode and ownership of eventfs_inode itself
|
|
||||||
* @data: The private data to pass to the callbacks
|
* @data: The private data to pass to the callbacks
|
||||||
|
* @attr: Saved mode and ownership of eventfs_inode itself
|
||||||
* @is_freed: Flag set if the eventfs is on its way to be freed
|
* @is_freed: Flag set if the eventfs is on its way to be freed
|
||||||
* Note if is_freed is set, then dentry is corrupted.
|
* Note if is_freed is set, then dentry is corrupted.
|
||||||
|
* @is_events: Flag set for only the top level "events" directory
|
||||||
* @nr_entries: The number of items in @entries
|
* @nr_entries: The number of items in @entries
|
||||||
|
* @ino: The saved inode number
|
||||||
*/
|
*/
|
||||||
struct eventfs_inode {
|
struct eventfs_inode {
|
||||||
struct kref kref;
|
union {
|
||||||
struct list_head list;
|
struct list_head list;
|
||||||
|
struct rcu_head rcu;
|
||||||
|
};
|
||||||
|
struct list_head children;
|
||||||
const struct eventfs_entry *entries;
|
const struct eventfs_entry *entries;
|
||||||
const char *name;
|
const char *name;
|
||||||
struct list_head children;
|
|
||||||
struct dentry *events_dir;
|
struct dentry *events_dir;
|
||||||
struct eventfs_attr *entry_attrs;
|
struct eventfs_attr *entry_attrs;
|
||||||
struct eventfs_attr attr;
|
|
||||||
void *data;
|
void *data;
|
||||||
|
struct eventfs_attr attr;
|
||||||
|
struct kref kref;
|
||||||
unsigned int is_freed:1;
|
unsigned int is_freed:1;
|
||||||
unsigned int is_events:1;
|
unsigned int is_events:1;
|
||||||
unsigned int nr_entries:30;
|
unsigned int nr_entries:30;
|
||||||
unsigned int ino;
|
unsigned int ino;
|
||||||
/*
|
|
||||||
* Union - used for deletion
|
|
||||||
* @llist: for calling dput() if needed after RCU
|
|
||||||
* @rcu: eventfs_inode to delete in RCU
|
|
||||||
*/
|
|
||||||
union {
|
|
||||||
struct llist_node llist;
|
|
||||||
struct rcu_head rcu;
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
|
|
||||||
static inline struct tracefs_inode *get_tracefs(const struct inode *inode)
|
static inline struct tracefs_inode *get_tracefs(const struct inode *inode)
|
||||||
|
Reference in New Issue
Block a user