tracefs: Update inode permissions on remount
authorSteven Rostedt (Google) <rostedt@goodmis.org>
Thu, 23 May 2024 05:14:27 +0000 (01:14 -0400)
committerSteven Rostedt (Google) <rostedt@goodmis.org>
Thu, 23 May 2024 13:26:23 +0000 (09:26 -0400)
commit27c046484382d78b4abb0a6e9905a20121af9b35
tree528437bad0c0d868827c82b8c4b7acd85dac1960
parent8898e7f288c47d450a3cf1511c791a03550c0789
tracefs: Update inode permissions on remount

When a remount happens, if a gid or uid is specified update the inodes to
have the same gid and uid. This will allow the simplification of the
permissions logic for the dynamically created files and directories.

Link: https://lore.kernel.org/linux-trace-kernel/20240523051539.592429986@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: Andrew Morton <akpm@linux-foundation.org>
Cc: Masahiro Yamada <masahiroy@kernel.org>
Fixes: baa23a8d4360d ("tracefs: Reset permissions on remount if permissions are options")
Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
fs/tracefs/event_inode.c
fs/tracefs/inode.c