]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
eventfs: Make sure that parent->d_inode is locked in creating files/dirs
authorSteven Rostedt (Google) <rostedt@goodmis.org>
Tue, 21 Nov 2023 23:10:07 +0000 (18:10 -0500)
committerSteven Rostedt (Google) <rostedt@goodmis.org>
Wed, 22 Nov 2023 23:37:33 +0000 (18:37 -0500)
commitf49f950c217bfb40f11662bab39cb388d41e4cfb
tree7f39b01dcb724c76bb060956d41f6fdc91efefbe
parentfc4561226feaad5fcdcb55646c348d77b8ee69c5
eventfs: Make sure that parent->d_inode is locked in creating files/dirs

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>
fs/tracefs/event_inode.c