Message ID | 20240130230612.377a1933@gandalf.local.home (mailing list archive) |
---|---|
State | Superseded |
Headers | show |
Series | [v2] tracefs: Zero out the tracefs_inode when allocating it | expand |
diff --git a/fs/tracefs/inode.c b/fs/tracefs/inode.c index e1b172c0e091..636180d45c62 100644 --- a/fs/tracefs/inode.c +++ b/fs/tracefs/inode.c @@ -38,8 +38,6 @@ static struct inode *tracefs_alloc_inode(struct super_block *sb) if (!ti) return NULL; - ti->flags = 0; - return &ti->vfs_inode; } @@ -779,6 +777,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); }