fs: icache RCU free inodes
[deliverable/linux.git] / fs / ncpfs / inode.c
index 8fb93b604e73a3a337a5f43ebc97b25d9f02d7f8..60047dbeb38d8254f347f103cb49fa6d547074d9 100644 (file)
@@ -58,11 +58,18 @@ static struct inode *ncp_alloc_inode(struct super_block *sb)
        return &ei->vfs_inode;
 }
 
-static void ncp_destroy_inode(struct inode *inode)
+static void ncp_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(ncp_inode_cachep, NCP_FINFO(inode));
 }
 
+static void ncp_destroy_inode(struct inode *inode)
+{
+       call_rcu(&inode->i_rcu, ncp_i_callback);
+}
+
 static void init_once(void *foo)
 {
        struct ncp_inode_info *ei = (struct ncp_inode_info *) foo;
This page took 0.023554 seconds and 5 git commands to generate.