Skip to content
/ linux Public
forked from torvalds/linux

Commit

Permalink
tracefs: Fix inode allocation
Browse files Browse the repository at this point in the history
commit 0df2ac5 upstream.

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]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
  • Loading branch information
minipli-oss authored and gregkh committed Aug 14, 2024
1 parent 4d035c7 commit a49f7de
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion fs/tracefs/inode.c
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ static struct inode *tracefs_alloc_inode(struct super_block *sb)
struct tracefs_inode *ti;
unsigned long flags;

ti = kmem_cache_alloc(tracefs_inode_cachep, GFP_KERNEL);
ti = alloc_inode_sb(sb, tracefs_inode_cachep, GFP_KERNEL);
if (!ti)
return NULL;

Expand Down

0 comments on commit a49f7de

Please sign in to comment.