Re: [PATCH 2/6] eventfsfs: initialize the tracefs inode properly

From: Steven Rostedt
Date: Tue Jan 30 2024 - 14:49:24 EST


On Tue, 30 Jan 2024 11:03:51 -0800
Linus Torvalds <torvalds@xxxxxxxxxxxxxxxxxxxx> wrote:

> @@ -328,7 +328,9 @@ static struct dentry *create_file(const char *name, umode_t mode,
> inode->i_ino = EVENTFS_FILE_INODE_INO;
>
> ti = get_tracefs(inode);
> - ti->flags |= TRACEFS_EVENT_INODE;
> + ti->flags = TRACEFS_EVENT_INODE;
> + ti->private = NULL; // Directories have 'ei', files not

Although ti->private does need to be initialized here.

-- Steve

> +
> d_instantiate(dentry, inode);
> fsnotify_create(dentry->d_parent->d_inode, dentry);
> return eventfs_end_creating(dentry);