Re: [linus:master] [eventfs] 852e46e239: BUG:unable_to_handle_page_fault_for_address

Steven Rostedt
2024-01-29T22:49:41Z

On Mon, 29 Jan 2024 14:42:47 -0800
Linus Torvalds <torvalds@linux-foundation.org> wrote:

> @@ -324,7 +322,7 @@ static struct dentry *lookup_file(struct dentry *dentry,
> ti->flags = TRACEFS_EVENT_INODE;
> ti->private = NULL; // Directories have 'ei', files not
>
> - d_instantiate(dentry, inode);
> + d_add(dentry, inode);
> fsnotify_create(dentry->d_parent->d_inode, dentry);
> return eventfs_end_creating(dentry);
> };
> @@ -365,7 +363,7 @@ static struct dentry *lookup_dir_entry(struct dentry *dentry,
> ei->dentry = dentry; // Remove me!
>
> inc_nlink(inode);
> - d_instantiate(dentry, inode);
> + d_add(dentry, inode);
> inc_nlink(dentry->d_parent->d_inode);
> fsnotify_mkdir(dentry->d_parent->d_inode, dentry);
> return eventfs_end_creating(dentry);
> @@ -786,7 +784,7 @@ struct eventfs_inode *eventfs_create_events_dir(const char *name, struct dentry
>
> /* directory inodes start off with i_nlink == 2 (for "." entry) */
> inc_nlink(inode);
> - d_instantiate(dentry, inode);
> + d_add(dentry, inode);

Now I didn't change this last d_instantiate, because this is not called
through the lookup code. This is the root events directory and acts more
like debugfs. It's not "dynamically" added.

-- Steve

> inc_nlink(dentry->d_parent->d_inode);
> fsnotify_mkdir(dentry->d_parent->d_inode, dentry);
> tracefs_end_creating(dentry);