]> www.infradead.org Git - nvme.git/commitdiff
eventfs: Remove unused d_parent pointer field
authorLinus Torvalds <torvalds@linux-foundation.org>
Wed, 31 Jan 2024 18:49:23 +0000 (13:49 -0500)
committerSteven Rostedt (Google) <rostedt@goodmis.org>
Thu, 1 Feb 2024 15:31:17 +0000 (10:31 -0500)
It's never used

Link: https://lore.kernel.org/linux-trace-kernel/202401291043.e62e89dc-oliver.sang@intel.com/
Link: https://lore.kernel.org/linux-trace-kernel/20240131185512.961772428@goodmis.org
Cc: stable@vger.kernel.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>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Fixes: c1504e510238 ("eventfs: Implement eventfs dir creation functions")
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
fs/tracefs/event_inode.c
fs/tracefs/internal.h

index 04c2ab90f93e63a8d0fb3f0783b82d4b8790f0b2..16ca8d9759b18e7fcf49f6653badffa32cef985e 100644 (file)
@@ -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? */
index 09037e2c173dc72330ced7d0cfc0030a0e7f3314..932733a2696a13fe20c7548f28a5c7dcd4cfa34e 100644 (file)
@@ -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
@@ -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;