aboutsummaryrefslogtreecommitdiffstats
path: root/fs/tracefs
diff options
context:
space:
mode:
authorSteven Rostedt (Red Hat) <rostedt@goodmis.org>2015-01-21 11:28:23 -0500
committerSteven Rostedt <rostedt@goodmis.org>2015-02-03 12:48:42 -0500
commitcc31004a4aa784d89054ec07b87eae05cecf7121 (patch)
tree423a36a0c918f4c368ddc82da2d4f33668861c68 /fs/tracefs
parentf76180bc07abc399977bfbe8c43bf58c4570e893 (diff)
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.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/fs/tracefs/inode.c b/fs/tracefs/inode.c
index 5b1547a452d8..0b9cf5cf24c9 100644
--- a/fs/tracefs/inode.c
+++ b/fs/tracefs/inode.c
@@ -16,6 +16,7 @@
16#include <linux/module.h> 16#include <linux/module.h>
17#include <linux/fs.h> 17#include <linux/fs.h>
18#include <linux/mount.h> 18#include <linux/mount.h>
19#include <linux/kobject.h>
19#include <linux/namei.h> 20#include <linux/namei.h>
20#include <linux/tracefs.h> 21#include <linux/tracefs.h>
21#include <linux/fsnotify.h> 22#include <linux/fsnotify.h>
@@ -509,10 +510,16 @@ bool tracefs_initialized(void)
509 return tracefs_registered; 510 return tracefs_registered;
510} 511}
511 512
513static struct kobject *trace_kobj;
514
512static int __init tracefs_init(void) 515static int __init tracefs_init(void)
513{ 516{
514 int retval; 517 int retval;
515 518
519 trace_kobj = kobject_create_and_add("tracing", kernel_kobj);
520 if (!trace_kobj)
521 return -EINVAL;
522
516 retval = register_filesystem(&trace_fs_type); 523 retval = register_filesystem(&trace_fs_type);
517 if (!retval) 524 if (!retval)
518 tracefs_registered = true; 525 tracefs_registered = true;