eventfs: Do not allow NULL parent to eventfs_start_creating()
authorSteven Rostedt (Google) <rostedt@goodmis.org>
Tue, 21 Nov 2023 23:10:06 +0000 (18:10 -0500)
committerSteven Rostedt (Google) <rostedt@goodmis.org>
Wed, 22 Nov 2023 23:37:26 +0000 (18:37 -0500)
commitfc4561226feaad5fcdcb55646c348d77b8ee69c5
treebb8d9f981516fd83d968ee71a494d1af13c6f4e9
parentbcae32c5632fc0a0dbce46fa731cd23403117e66
eventfs: Do not allow NULL parent to eventfs_start_creating()

The eventfs directory is dynamically created via the meta data supplied by
the existing trace events. All files and directories in eventfs has a
parent. Do not allow NULL to be passed into eventfs_start_creating() as
the parent because that should never happen. Warn if it does.

Link: https://lkml.kernel.org/r/20231121231112.693841807@goodmis.org
Cc: Masami Hiramatsu <mhiramat@kernel.org>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Reviewed-by: Josef Bacik <josef@toxicpanda.com>
Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
fs/tracefs/inode.c