Messages in this thread | ![/](/images/icornerl.gif) | | Date | Tue, 30 Jan 2024 14:56:55 -0500 | From | Steven Rostedt <> | Subject | Re: [PATCH 2/6] eventfsfs: initialize the tracefs inode properly |
| |
On Tue, 30 Jan 2024 14:48:02 -0500 Steven Rostedt <rostedt@goodmis.org> wrote:
> The ti is allocated from fs/tracefs/inode.c that has: > > static struct inode *tracefs_alloc_inode(struct super_block *sb) > { > struct tracefs_inode *ti; > > ti = kmem_cache_alloc(tracefs_inode_cachep, GFP_KERNEL);
I could also just add __GFP_ZERO so that all of it is initialized to zero, and then we don't need to assign NULL to any part of it.
-- Steve
> if (!ti) > return NULL; > > ti->flags = 0; > > return &ti->vfs_inode; > } > >
| ![\](/images/icornerr.gif) |