]> git.karo-electronics.de Git - mv-sheeva.git/blobdiff - fs/ntfs/inode.c
fs: icache RCU free inodes
[mv-sheeva.git] / fs / ntfs / inode.c
index 93622b175fc7f6f10f8cd744c8ebdba65401b1ea..a627ed82c0a3f4c4303b8de8239e693826bc7862 100644 (file)
@@ -332,6 +332,13 @@ struct inode *ntfs_alloc_big_inode(struct super_block *sb)
        return NULL;
 }
 
+static void ntfs_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(ntfs_big_inode_cache, NTFS_I(inode));
+}
+
 void ntfs_destroy_big_inode(struct inode *inode)
 {
        ntfs_inode *ni = NTFS_I(inode);
@@ -340,7 +347,7 @@ void ntfs_destroy_big_inode(struct inode *inode)
        BUG_ON(ni->page);
        if (!atomic_dec_and_test(&ni->count))
                BUG();
-       kmem_cache_free(ntfs_big_inode_cache, NTFS_I(inode));
+       call_rcu(&inode->i_rcu, ntfs_i_callback);
 }
 
 static inline ntfs_inode *ntfs_alloc_extent_inode(void)