Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

+7
+7
fs/tracefs/inode.c
··· 16 16 #include <linux/module.h> 17 17 #include <linux/fs.h> 18 18 #include <linux/mount.h> 19 + #include <linux/kobject.h> 19 20 #include <linux/namei.h> 20 21 #include <linux/tracefs.h> 21 22 #include <linux/fsnotify.h> ··· 510 509 return tracefs_registered; 511 510 } 512 511 512 + static struct kobject *trace_kobj; 513 + 513 514 static int __init tracefs_init(void) 514 515 { 515 516 int retval; 517 + 518 + trace_kobj = kobject_create_and_add("tracing", kernel_kobj); 519 + if (!trace_kobj) 520 + return -EINVAL; 516 521 517 522 retval = register_filesystem(&trace_fs_type); 518 523 if (!retval)