]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
eventfs: Remove "lookup" parameter from create_dir/file_dentry()
authorSteven Rostedt (Google) <rostedt@goodmis.org>
Tue, 6 Feb 2024 11:31:59 +0000 (06:31 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 23 Feb 2024 08:51:42 +0000 (09:51 +0100)
commit5785aa29b39701ebd008d92aec61abf8544e8f4f
treebeb7ac5b3471499c225a5919901c4e8051840aa3
parentcaf2da1d4562de4e35eedec0be2b7f1ee25d83be
eventfs: Remove "lookup" parameter from create_dir/file_dentry()

commit b0f7e2d739b4aac131ea1662d086a07775097b05 upstream.

The "lookup" parameter is a way to differentiate the call to
create_file/dir_dentry() from when it's just a lookup (no need to up the
dentry refcount) and accessed via a readdir (need to up the refcount).

But reality, it just makes the code more complex. Just up the refcount and
let the caller decide to dput() the result or not.

Link: https://lore.kernel.org/linux-trace-kernel/20240103102553.17a19cea@gandalf.local.home
Link: https://lore.kernel.org/linux-trace-kernel/20240104015435.517502710@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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/tracefs/event_inode.c