[PATCH] eventfs: Add kernel doc to eventfs_root_lookup_ro()
From: Steven Rostedt
Date: Mon Nov 30 2026 - 15:42:10 EST
From: Steven Rostedt <rostedt@xxxxxxxxxxx>
When eventfs_root_lookup() was split to have a read-only version, the
kerneldoc stayed with the helper function and just added the @ro
parameter. But what really should have been done was add a kerneldoc to
the new eventfs_root_lookup_ro() function.
Also fix up the description to mention the creation of inodes and
dentries.
Reported-by: Manuel Ebner <manuelebnerli@xxxxxxxxxxx>
Link: https://lore.kernel.org/all/20261130195627.1893730-1-manuelebnerli@xxxxxxxxxxx/
Signed-off-by: Steven Rostedt <rostedt@xxxxxxxxxxx>
---
fs/tracefs/event_inode.c | 34 +++++++++++++++++++++++-----------
1 file changed, 23 insertions(+), 11 deletions(-)
diff --git a/fs/tracefs/event_inode.c b/fs/tracefs/event_inode.c
index e57c962ca441..8f5e714f267e 100644
--- a/fs/tracefs/event_inode.c
+++ b/fs/tracefs/event_inode.c
@@ -650,17 +650,6 @@ lookup_file_dentry(struct dentry *dentry,
return lookup_file(ei, dentry, mode, attr, data, fops, ro);
}
-/**
- * eventfs_root_lookup - lookup routine to create file/dir
- * @dir: in which a lookup is being done
- * @dentry: file/dir dentry
- * @flags: Just passed to simple_lookup()
- * @ro: Denote if this is from a read-only eventfs
- *
- * Used to create dynamic file/dir with-in @dir, search with-in @ei
- * list, if @dentry found go ahead and create the file/dir
- */
-
static struct dentry *__eventfs_root_lookup(struct inode *dir,
struct dentry *dentry,
unsigned int flags,
@@ -712,6 +701,16 @@ static struct dentry *__eventfs_root_lookup(struct inode *dir,
return NULL;
}
+/**
+ * eventfs_root_lookup - lookup routine to create file/dir
+ * @dir: in which a lookup is being done
+ * @dentry: file/dir dentry
+ * @flags: Just passed to simple_lookup()
+ *
+ * Used to create dynamic file/dir with-in @dir, search with-in @ei
+ * list, if @dentry found go ahead and create the file/dir inode and
+ * dentries.
+ */
static struct dentry *eventfs_root_lookup(struct inode *dir,
struct dentry *dentry,
unsigned int flags)
@@ -719,6 +718,19 @@ static struct dentry *eventfs_root_lookup(struct inode *dir,
return __eventfs_root_lookup(dir, dentry, flags, false);
}
+/**
+ * eventfs_root_lookup_ro - lookup routine to create read only file/dir
+ * @dir: in which a lookup is being done
+ * @dentry: file/dir dentry
+ * @flags: Just passed to simple_lookup()
+ *
+ * Used to create dynamic file/dir with-in @dir, search with-in @ei
+ * list, if @dentry found go ahead and create the file/dir inode and
+ * dentries.
+ *
+ * This is used only for read only eventfs file system that displays
+ * only inframtion files for trace events.
+ */
static struct dentry *eventfs_root_lookup_ro(struct inode *dir,
struct dentry *dentry,
unsigned int flags)
--
2.53.0