mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-12 05:48:40 +00:00
tracing: Make tracing work when debugfs is not configured in
Currently tracing_init_dentry() returns -ENODEV when debugfs is not configured in, which causes tracefs not populated with tracing files and directories, so we will get an empty directory even after we manually mount tracefs. We can make tracing_init_dentry() return NULL if debugfs is not configured in and can manually mount tracefs. But return -ENODEV if debugfs is configured in but not initialized or failed to create automount point as that would break backward compatibility with older tools. Link: http://lkml.kernel.org/r/1446797056-11683-1-git-send-email-hello.wjx@gmail.com Signed-off-by: Jiaxing Wang <hello.wjx@gmail.com> Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
This commit is contained in:
parent
d227c3ae4e
commit
8b1291994d
1 changed files with 3 additions and 1 deletions
|
@ -6847,7 +6847,9 @@ struct dentry *tracing_init_dentry(void)
|
|||
if (tr->dir)
|
||||
return NULL;
|
||||
|
||||
if (WARN_ON(!debugfs_initialized()))
|
||||
if (WARN_ON(!tracefs_initialized()) ||
|
||||
(IS_ENABLED(CONFIG_DEBUG_FS) &&
|
||||
WARN_ON(!debugfs_initialized())))
|
||||
return ERR_PTR(-ENODEV);
|
||||
|
||||
/*
|
||||
|
|
Loading…
Reference in a new issue