fs: icache RCU free inodes
[linux-2.6-block.git] / fs / 9p / vfs_inode.c
index 1073bca8488cca98c0a3a898638308218c256b86..f6f9081e6d2ce5650573b2205fa71e834f9fa9ef 100644 (file)
@@ -237,10 +237,17 @@ struct inode *v9fs_alloc_inode(struct super_block *sb)
  *
  */
 
-void v9fs_destroy_inode(struct inode *inode)
+static void v9fs_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(vcookie_cache, v9fs_inode2cookie(inode));
 }
+
+void v9fs_destroy_inode(struct inode *inode)
+{
+       call_rcu(&inode->i_rcu, v9fs_i_callback);
+}
 #endif
 
 /**