Re: [PATCH v2 4/7] tracefs: dentry lookup crapectomy

2024-01-31 Thread Steven Rostedt
On Wed, 31 Jan 2024 22:21:27 -0500 Steven Rostedt wrote: > We (Linus and I) got it wrong. It originally had: > > d_add(dentry, NULL); > [..] > return NULL; OK, so I changed that function to this: static struct dentry *eventfs_root_lookup(struct inode *dir,

Re: [PATCH v2 4/7] tracefs: dentry lookup crapectomy

2024-01-31 Thread Steven Rostedt
On Thu, 1 Feb 2024 03:02:05 + Al Viro wrote: > > We had a problem here with just returning NULL. It leaves the negative > > dentry around and doesn't get refreshed. > > Why would that dentry stick around? And how would anyone find > it, anyway, when it's not hashed? We (Linus and I) got

Re: [PATCH v2 4/7] tracefs: dentry lookup crapectomy

2024-01-31 Thread Al Viro
On Wed, Jan 31, 2024 at 09:26:42PM -0500, Steven Rostedt wrote: > > Huh? Just return NULL and be done with that - you'll get an > > unhashed negative dentry and let the caller turn that into > > -ENOENT... > > We had a problem here with just returning NULL. It leaves the negative > dentry around

Re: [PATCH v2 4/7] tracefs: dentry lookup crapectomy

2024-01-31 Thread Steven Rostedt
On Thu, 1 Feb 2024 00:27:19 + Al Viro wrote: > On Wed, Jan 31, 2024 at 01:49:22PM -0500, Steven Rostedt wrote: > > > @@ -329,32 +320,29 @@ static struct dentry *create_file(const char *name, > > umode_t mode, > > > > ti = get_tracefs(inode); > > ti->flags |= TRACEFS_EVENT_INODE; >

Re: [PATCH v2 4/7] tracefs: dentry lookup crapectomy

2024-01-31 Thread Al Viro
On Wed, Jan 31, 2024 at 01:49:22PM -0500, Steven Rostedt wrote: > @@ -329,32 +320,29 @@ static struct dentry *create_file(const char *name, > umode_t mode, > > ti = get_tracefs(inode); > ti->flags |= TRACEFS_EVENT_INODE; > - d_instantiate(dentry, inode); > + > + d_add(dentry

[PATCH v2 4/7] tracefs: dentry lookup crapectomy

2024-01-31 Thread Steven Rostedt
From: Linus Torvalds The dentry lookup for eventfs files was very broken, and had lots of signs of the old situation where the filesystem names were all created statically in the dentry tree, rather than being looked up dynamically based on the eventfs data structures. You could see it in the na