#include <linux/module.h>
#include <linux/kobject.h>
#include <linux/tracefs.h>
#include <linux/fsnotify.h>
#include <linux/seq_file.h>
#include <linux/parser.h>
#define TRACEFS_DEFAULT_MODE 0700
static struct vfsmount *tracefs_mount;
static int tracefs_mount_count;
static bool tracefs_registered;
static ssize_t default_read_file(struct file *file, char __user *buf,
size_t count, loff_t *ppos)
static ssize_t default_write_file(struct file *file, const char __user *buf,
size_t count, loff_t *ppos)
static const struct file_operations tracefs_file_operations = {
.read = default_read_file,
.write = default_write_file,
static struct tracefs_dir_ops {
int (*mkdir)(const char *name);
int (*rmdir)(const char *name);
} tracefs_ops __ro_after_init;
static char *get_dname(struct dentry *dentry)
int len = dentry->d_name.len;