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 <ajay.kaher@broadcom.com> Cc: Masami Hiramatsu <mhiramat@kernel.org> Cc: Mathieu Desnoyers <mathieu.desnoyers@efficios.com> Cc: Al Viro <viro@zeniv.linux.org.uk> Cc: stable@vger.kernel.org Link: https://lore.kernel.org/20240807115143.45927-2-minipli@grsecurity.net Fixes: ba37ff7 ("eventfs: Implement tracefs_inode_cache") Signed-off-by: Mathias Krause <minipli@grsecurity.net> Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
1 parent 6e2fdce commit 0df2ac5

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

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)