[PATCH DRAFT 2/4] : trace: stash kernfs_node instead of dentries

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Signed-off-by: Christian Brauner <brauner@xxxxxxxxxx>
---
 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





[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [NTFS 3]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [NTFS 3]     [Samba]     [Device Mapper]     [CEPH Development]

  Powered by Linux