Thread (77 messages) 77 messages, 10 authors, 2024-10-09

Re: [PATCH 05/14] tracefs: replace call_rcu by kfree_rcu for simple kmem_cache_free callback

From: Steven Rostedt <rostedt@goodmis.org>
Date: 2024-06-10 21:18:17
Also in: kernel-janitors, lkml

On Mon, 10 Jun 2024 22:42:30 +0200
Vlastimil Babka [off-list ref] wrote:
On 6/10/24 5:46 PM, Paul E. McKenney wrote:
quoted
On Mon, Jun 10, 2024 at 11:22:23AM -0400, Steven Rostedt wrote:  
quoted
On Sun,  9 Jun 2024 10:27:17 +0200
Julia Lawall [off-list ref] wrote:
  
quoted
diff --git a/fs/tracefs/inode.c b/fs/tracefs/inode.c
index 7c29f4afc23d..338c52168e61 100644
--- a/fs/tracefs/inode.c
+++ b/fs/tracefs/inode.c
@@ -53,14 +53,6 @@ static struct inode *tracefs_alloc_inode(struct super_block *sb)
 	return &ti->vfs_inode;
 }
 
-static void tracefs_free_inode_rcu(struct rcu_head *rcu)
-{
-	struct tracefs_inode *ti;
-
-	ti = container_of(rcu, struct tracefs_inode, rcu);
-	kmem_cache_free(tracefs_inode_cachep, ti);  
Does this work?

tracefs needs to be freed via the tracefs_inode_cachep. Does
kfree_rcu() handle specific frees for objects that were not allocated
via kmalloc()?  
A recent change to kfree() allows it to correctly handle memory allocated
via kmem_cache_alloc().  News to me as of a few weeks ago.  ;-)  
Hey, I did try not to keep that a secret :)
https://lore.kernel.org/all/20230310103210.22372-8-vbabka@suse.cz/ (local)
Heh, I didn't look at that patch very deeply.

-- Steve
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help