Skip to content

Commit

Permalink
eventfs: Remove unused d_parent pointer field
Browse files Browse the repository at this point in the history
It's never used

Link: https://lore.kernel.org/linux-trace-kernel/[email protected]/
Link: https://lore.kernel.org/linux-trace-kernel/[email protected]

Cc: [email protected]
Cc: Masami Hiramatsu <[email protected]>
Cc: Mark Rutland <[email protected]>
Cc: Mathieu Desnoyers <[email protected]>
Cc: Christian Brauner <[email protected]>
Cc: Al Viro <[email protected]>
Cc: Ajay Kaher <[email protected]>
Cc: Greg Kroah-Hartman <[email protected]>
Fixes: c1504e5 ("eventfs: Implement eventfs dir creation functions")
Signed-off-by: Linus Torvalds <[email protected]>
Signed-off-by: Steven Rostedt (Google) <[email protected]>
  • Loading branch information
torvalds authored and rostedt committed Feb 1, 2024
1 parent 49304c2 commit 408600b
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 5 deletions.
4 changes: 1 addition & 3 deletions fs/tracefs/event_inode.c
Original file line number Diff line number Diff line change
Expand Up @@ -680,10 +680,8 @@ struct eventfs_inode *eventfs_create_dir(const char *name, struct eventfs_inode
INIT_LIST_HEAD(&ei->list);

mutex_lock(&eventfs_mutex);
if (!parent->is_freed) {
if (!parent->is_freed)
list_add_tail(&ei->list, &parent->children);
ei->d_parent = parent->dentry;
}
mutex_unlock(&eventfs_mutex);

/* Was the parent freed? */
Expand Down
2 changes: 0 additions & 2 deletions fs/tracefs/internal.h
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ struct eventfs_attr {
* @name: the name of the directory to create
* @children: link list into the child eventfs_inode
* @dentry: the dentry of the directory
* @d_parent: pointer to the parent's dentry
* @d_children: The array of dentries to represent the files when created
* @entry_attrs: Saved mode and ownership of the @d_children
* @attr: Saved mode and ownership of eventfs_inode itself
Expand All @@ -51,7 +50,6 @@ struct eventfs_inode {
const char *name;
struct list_head children;
struct dentry *dentry; /* Check is_freed to access */
struct dentry *d_parent;
struct dentry **d_children;
struct eventfs_attr *entry_attrs;
struct eventfs_attr attr;
Expand Down

0 comments on commit 408600b

Please sign in to comment.