On Wed, 31 Jan 2024 11:13:58 -0500 Steven Rostedt <rost...@goodmis.org> wrote:
> On Wed, 31 Jan 2024 10:58:47 -0500 > Steven Rostedt <rost...@goodmis.org> wrote: > > > @@ -788,6 +717,7 @@ static void init_once(void *foo) > > { > > struct tracefs_inode *ti = (struct tracefs_inode *) foo; > > > > + memset(ti, 0, sizeof(*ti)); > > inode_init_once(&ti->vfs_inode); > > } > > > > Note, that inode_init_once() also does a memset on the entire inode, so the > initial memset is redundant on the inode portion. But I didn't think it was > really worth the time to complicate the code by optimizing it. I guess if I > changed the structure to: > > struct tracefs_inode { > + struct inode vfs_inode; > unsigned long flags; > void *private; > - struct inode vfs_inode; > }; > > I could have it do: > > memset_after(ti, 0, vfs_inode); > > But this can be done as a separate clean up and doesn't need to be done now. > Hmm, since I need to run all the tests again, I think I'll change this patch to do the above. -- Steve