Skip to content

Commit 072e133

Browse files
Peter Enderborggregkh
authored andcommitted
tracefs: Remove unnecessary debug_fs checks.
This is a preparation for debugfs restricted mode. We don't need debugfs to trace, the removed check stop tracefs to work if debugfs is not initialised. We instead tries to automount within debugfs and relay on it's handling. The code path is to create a backward compatibility from when tracefs was part of debugfs, it is now standalone and does not need debugfs. When debugfs is in restricted it is compiled in but not active and return EPERM to clients and tracefs wont work if it assumes it is active it is compiled in kernel. Reported-by: kernel test robot <[email protected]> Signed-off-by: Peter Enderborg <[email protected]> Reviewed-by: Greg Kroah-Hartman <[email protected]> Acked-by: Steven Rostedt (VMware) <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent b292b50 commit 072e133

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

kernel/trace/trace.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8945,9 +8945,7 @@ struct dentry *tracing_init_dentry(void)
89458945
if (tr->dir)
89468946
return NULL;
89478947

8948-
if (WARN_ON(!tracefs_initialized()) ||
8949-
(IS_ENABLED(CONFIG_DEBUG_FS) &&
8950-
WARN_ON(!debugfs_initialized())))
8948+
if (WARN_ON(!tracefs_initialized()))
89518949
return ERR_PTR(-ENODEV);
89528950

89538951
/*

0 commit comments

Comments
 (0)