]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
eventfs: Make sure that parent->d_inode is locked in creating files/dirs
authorSteven Rostedt (Google) <rostedt@goodmis.org>
Tue, 6 Feb 2024 12:09:34 +0000 (07:09 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 23 Feb 2024 08:25:22 +0000 (09:25 +0100)
commit6eee5c6708614349234a0437d2cdc2610e910adc
tree9cd402c08f4cdbf8d2a7dd45554b5a21cccf7d7f
parent29bb70cad6685839f4e5d0b97c4d7ffc8639cb9d
eventfs: Make sure that parent->d_inode is locked in creating files/dirs

commit f49f950c217bfb40f11662bab39cb388d41e4cfb upstream.

Since the locking of the parent->d_inode has been moved outside the
creation of the files and directories (as it use to be locked via a
conditional), add a WARN_ON_ONCE() to the case that it's not locked.

Link: https://lkml.kernel.org/r/20231121231112.853962542@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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/tracefs/event_inode.c