aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMathias Krause <[email protected]>2024-08-07 13:51:38 +0200
committerSteven Rostedt (Google) <[email protected]>2024-08-07 18:49:06 -0400
commit0df2ac59bebfac221463ef57ed3554899b41d75f (patch)
tree8dc13bdb5a9d5281f769851b30af784803507c4a
parent6e2fdceffdc6bd7b8ba314a1d1b976721533c8f9 (diff)
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: ba37ff75e04b ("eventfs: Implement tracefs_inode_cache") Signed-off-by: Mathias Krause <[email protected]> Signed-off-by: Steven Rostedt (Google) <[email protected]>
-rw-r--r--fs/tracefs/inode.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/tracefs/inode.c b/fs/tracefs/inode.c
index 1028ab6d9a74..21a7e51fc3c1 100644
--- a/fs/tracefs/inode.c
+++ b/fs/tracefs/inode.c
@@ -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;