File tree Expand file tree Collapse file tree 2 files changed +6
-3
lines changed Expand file tree Collapse file tree 2 files changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -38,8 +38,6 @@ static struct inode *tracefs_alloc_inode(struct super_block *sb)
38
38
if (!ti )
39
39
return NULL ;
40
40
41
- ti -> flags = 0 ;
42
-
43
41
return & ti -> vfs_inode ;
44
42
}
45
43
@@ -779,7 +777,11 @@ static void init_once(void *foo)
779
777
{
780
778
struct tracefs_inode * ti = (struct tracefs_inode * ) foo ;
781
779
780
+ /* inode_init_once() calls memset() on the vfs_inode portion */
782
781
inode_init_once (& ti -> vfs_inode );
782
+
783
+ /* Zero out the rest */
784
+ memset_after (ti , 0 , vfs_inode );
783
785
}
784
786
785
787
static int __init tracefs_init (void )
Original file line number Diff line number Diff line change @@ -11,9 +11,10 @@ enum {
11
11
};
12
12
13
13
struct tracefs_inode {
14
+ struct inode vfs_inode ;
15
+ /* The below gets initialized with memset_after(ti, 0, vfs_inode) */
14
16
unsigned long flags ;
15
17
void * private ;
16
- struct inode vfs_inode ;
17
18
};
18
19
19
20
/*
You can’t perform that action at this time.
0 commit comments