Message ID | 20240130151737.6e97ae00@gandalf.local.home (mailing list archive) |
---|---|
State | Superseded |
Headers | show |
Series | tracefs: Zero out the tracefs_inode when allocating it | expand |
diff --git a/fs/tracefs/inode.c b/fs/tracefs/inode.c index e1b172c0e091..f7cde61ff2fc 100644 --- a/fs/tracefs/inode.c +++ b/fs/tracefs/inode.c @@ -34,12 +34,10 @@ static struct inode *tracefs_alloc_inode(struct super_block *sb) { struct tracefs_inode *ti; - ti = kmem_cache_alloc(tracefs_inode_cachep, GFP_KERNEL); + ti = kmem_cache_alloc(tracefs_inode_cachep, GFP_KERNEL | __GFP_ZERO); if (!ti) return NULL; - ti->flags = 0; - return &ti->vfs_inode; }