Skip to content

Commit 0df2ac5

Browse files
minipli-ossrostedt
authored andcommitted
tracefs: Fix inode allocation
The leading comment above alloc_inode_sb() is pretty explicit about it: /* * This must be used for allocating filesystems specific inodes to set * up the inode reclaim context correctly. */ Switch tracefs over to alloc_inode_sb() to make sure inodes are properly linked. Cc: Ajay Kaher <[email protected]> Cc: Masami Hiramatsu <[email protected]> Cc: Mathieu Desnoyers <[email protected]> Cc: Al Viro <[email protected]> Cc: [email protected] Link: https://lore.kernel.org/[email protected] Fixes: ba37ff7 ("eventfs: Implement tracefs_inode_cache") Signed-off-by: Mathias Krause <[email protected]> Signed-off-by: Steven Rostedt (Google) <[email protected]>
1 parent 6e2fdce commit 0df2ac5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

fs/tracefs/inode.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ static struct inode *tracefs_alloc_inode(struct super_block *sb)
4242
struct tracefs_inode *ti;
4343
unsigned long flags;
4444

45-
ti = kmem_cache_alloc(tracefs_inode_cachep, GFP_KERNEL);
45+
ti = alloc_inode_sb(sb, tracefs_inode_cachep, GFP_KERNEL);
4646
if (!ti)
4747
return NULL;
4848

0 commit comments

Comments
 (0)