fs: icache RCU free inodes
[deliverable/linux.git] / fs / cifs / cifsfs.c
index 3936aa7f2c2285cfb59857f8fe1925528920543a..223717dcc401937323ee479fc40b9bf5e4816f71 100644 (file)
@@ -334,10 +334,17 @@ cifs_alloc_inode(struct super_block *sb)
        return &cifs_inode->vfs_inode;
 }
 
+static void cifs_i_callback(struct rcu_head *head)
+{
+       struct inode *inode = container_of(head, struct inode, i_rcu);
+       INIT_LIST_HEAD(&inode->i_dentry);
+       kmem_cache_free(cifs_inode_cachep, CIFS_I(inode));
+}
+
 static void
 cifs_destroy_inode(struct inode *inode)
 {
-       kmem_cache_free(cifs_inode_cachep, CIFS_I(inode));
+       call_rcu(&inode->i_rcu, cifs_i_callback);
 }
 
 static void
This page took 0.025203 seconds and 5 git commands to generate.