diff options
author | Steven Rostedt (Red Hat) <rostedt@goodmis.org> | 2015-01-21 16:28:23 (GMT) |
---|---|---|
committer | Steven Rostedt <rostedt@goodmis.org> | 2015-02-03 17:48:42 (GMT) |
commit | cc31004a4aa784d89054ec07b87eae05cecf7121 (patch) | |
tree | 423a36a0c918f4c368ddc82da2d4f33668861c68 /fs/tracefs | |
parent | f76180bc07abc399977bfbe8c43bf58c4570e893 (diff) | |
download | linux-cc31004a4aa784d89054ec07b87eae05cecf7121.tar.xz |
tracefs: Add directory /sys/kernel/tracing
When tracefs is configured, have the directory /sys/kernel/tracing appear
just like /sys/kernel/debug appears when debugfs is configured.
This will give a consistent place for system admins to mount tracefs.
Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
Diffstat (limited to 'fs/tracefs')
-rw-r--r-- | fs/tracefs/inode.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/fs/tracefs/inode.c b/fs/tracefs/inode.c index 5b1547a..0b9cf5c 100644 --- a/fs/tracefs/inode.c +++ b/fs/tracefs/inode.c @@ -16,6 +16,7 @@ #include <linux/module.h> #include <linux/fs.h> #include <linux/mount.h> +#include <linux/kobject.h> #include <linux/namei.h> #include <linux/tracefs.h> #include <linux/fsnotify.h> @@ -509,10 +510,16 @@ bool tracefs_initialized(void) return tracefs_registered; } +static struct kobject *trace_kobj; + static int __init tracefs_init(void) { int retval; + trace_kobj = kobject_create_and_add("tracing", kernel_kobj); + if (!trace_kobj) + return -EINVAL; + retval = register_filesystem(&trace_fs_type); if (!retval) tracefs_registered = true; |