[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20150124030056.GC5009@kroah.com>
Date: Sat, 24 Jan 2015 11:00:56 +0800
From: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
To: Steven Rostedt <rostedt@...dmis.org>
Cc: linux-kernel@...r.kernel.org, Al Viro <viro@...IV.linux.org.uk>,
Ingo Molnar <mingo@...nel.org>,
Andrew Morton <akpm@...ux-foundation.org>
Subject: Re: [PATCH 4/5 v2] tracefs: Add directory /sys/kernel/tracing
On Fri, Jan 23, 2015 at 10:55:29AM -0500, Steven Rostedt wrote:
> From: "Steven Rostedt (Red Hat)" <rostedt@...dmis.org>
>
> 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.
>
> Signed-off-by: Steven Rostedt <rostedt@...dmis.org>
> ---
> fs/tracefs/inode.c | 7 +++++++
> 1 file changed, 7 insertions(+)
>
> diff --git a/fs/tracefs/inode.c b/fs/tracefs/inode.c
> index c31997a303c7..cdbaa42b44a1 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>
> @@ -547,10 +548,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;
> --
> 2.1.4
>
Acked-by: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists