From: Christian Brauner <brauner@kernel.org>
To: Steven Rostedt <rostedt@goodmis.org>,
Linus Torvalds <torvalds@linux-foundation.org>,
Amir Goldstein <amir73il@gmail.com>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: lsf-pc@lists.linux-foundation.org, linux-fsdevel@vger.kernel.org,
Al Viro <viro@zeniv.linux.org.uk>,
Matthew Wilcox <willy@infradead.org>,
Christian Brauner <brauner@kernel.org>
Subject: [PATCH DRAFT 2/4] : trace: stash kernfs_node instead of dentries
Date: Wed, 31 Jan 2024 14:36:39 +0100 [thread overview]
Message-ID: <20240131-tracefs-kernfs-v1-2-f20e2e9a8d61@kernel.org> (raw)
In-Reply-To: <20240131-tracefs-kernfs-v1-0-f20e2e9a8d61@kernel.org>
Signed-off-by: Christian Brauner <brauner@kernel.org>
---
kernel/trace/trace_events_synth.c | 4 ++--
kernel/trace/trace_events_user.c | 2 +-
kernel/trace/trace_hwlat.c | 8 ++++----
3 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/kernel/trace/trace_events_synth.c b/kernel/trace/trace_events_synth.c
index e7af286af4f1..4fe196effada 100644
--- a/kernel/trace/trace_events_synth.c
+++ b/kernel/trace/trace_events_synth.c
@@ -2312,7 +2312,7 @@ core_initcall(trace_events_synth_init_early);
static __init int trace_events_synth_init(void)
{
- struct dentry *entry = NULL;
+ struct kernfs_node *entry = NULL;
int err = 0;
err = tracing_init_dentry();
if (err)
@@ -2320,7 +2320,7 @@ static __init int trace_events_synth_init(void)
entry = tracefs_create_file("synthetic_events", TRACE_MODE_WRITE,
NULL, NULL, &synth_events_fops);
- if (!entry) {
+ if (IS_ERR(entry)) {
err = -ENODEV;
goto err;
}
diff --git a/kernel/trace/trace_events_user.c b/kernel/trace/trace_events_user.c
index e76f5e1efdf2..d461b2c5bd41 100644
--- a/kernel/trace/trace_events_user.c
+++ b/kernel/trace/trace_events_user.c
@@ -2698,7 +2698,7 @@ static const struct file_operations user_status_fops = {
*/
static int create_user_tracefs(void)
{
- struct dentry *edata, *emmap;
+ struct kernfs_node *edata, *emmap;
edata = tracefs_create_file("user_events_data", TRACE_MODE_WRITE,
NULL, NULL, &user_data_fops);
diff --git a/kernel/trace/trace_hwlat.c b/kernel/trace/trace_hwlat.c
index b791524a6536..11b9f98b8d75 100644
--- a/kernel/trace/trace_hwlat.c
+++ b/kernel/trace/trace_hwlat.c
@@ -54,9 +54,9 @@ static struct trace_array *hwlat_trace;
#define DEFAULT_SAMPLE_WIDTH 500000 /* 0.5s */
#define DEFAULT_LAT_THRESHOLD 10 /* 10us */
-static struct dentry *hwlat_sample_width; /* sample width us */
-static struct dentry *hwlat_sample_window; /* sample window us */
-static struct dentry *hwlat_thread_mode; /* hwlat thread mode */
+static struct kernfs_node *hwlat_sample_width; /* sample width us */
+static struct kernfs_node *hwlat_sample_window; /* sample window us */
+static struct kernfs_node *hwlat_thread_mode; /* hwlat thread mode */
enum {
MODE_NONE = 0,
@@ -769,7 +769,7 @@ static const struct file_operations thread_mode_fops = {
static int init_tracefs(void)
{
int ret;
- struct dentry *top_dir;
+ struct kernfs_node *top_dir;
ret = tracing_init_dentry();
if (ret)
--
2.43.0
next prev parent reply other threads:[~2024-01-31 13:37 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-01-31 13:36 [PATCH DRAFT 0/4] : Port tracefs to kernfs Christian Brauner
2024-01-31 13:36 ` [PATCH DRAFT 1/4] : tracefs: port " Christian Brauner
2024-02-01 0:37 ` kernel test robot
2024-02-01 0:37 ` kernel test robot
2024-02-01 7:01 ` kernel test robot
2024-01-31 13:36 ` Christian Brauner [this message]
2024-01-31 13:36 ` [PATCH DRAFT 3/4] : hwlat: port struct file_operations thread_mode_fops to struct kernfs_ops Christian Brauner
2024-02-01 3:30 ` kernel test robot
2024-01-31 13:36 ` [PATCH DRAFT 4/4] : trace: illustrate how to convert basic open functions Christian Brauner
2024-01-31 14:41 ` [PATCH DRAFT 0/4] : Port tracefs to kernfs Steven Rostedt
2024-01-31 15:28 ` Steven Rostedt
2024-01-31 14:59 ` James Bottomley
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240131-tracefs-kernfs-v1-2-f20e2e9a8d61@kernel.org \
--to=brauner@kernel.org \
--cc=amir73il@gmail.com \
--cc=gregkh@linuxfoundation.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=lsf-pc@lists.linux-foundation.org \
--cc=rostedt@goodmis.org \
--cc=torvalds@linux-foundation.org \
--cc=viro@zeniv.linux.org.uk \
--cc=willy@infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).