This commit was manufactured by cvs2svn to create tag
[linux-2.6.git] / fs / xfs / linux-2.6 / xfs_super.c
index 00818cd..e7825df 100644 (file)
@@ -76,8 +76,7 @@
 STATIC struct quotactl_ops linvfs_qops;
 STATIC struct super_operations linvfs_sops;
 STATIC struct export_operations linvfs_export_ops;
-STATIC kmem_zone_t *linvfs_inode_zone;
-STATIC kmem_shaker_t xfs_inode_shaker;
+STATIC kmem_cache_t * linvfs_inode_cachep;
 
 STATIC struct xfs_mount_args *
 xfs_args_allocate(
@@ -290,7 +289,7 @@ linvfs_alloc_inode(
 {
        vnode_t                 *vp;
 
-       vp = (vnode_t *)kmem_cache_alloc(linvfs_inode_zone
+       vp = (vnode_t *)kmem_cache_alloc(linvfs_inode_cachep
                 kmem_flags_convert(KM_SLEEP));
        if (!vp)
                return NULL;
@@ -301,20 +300,7 @@ STATIC void
 linvfs_destroy_inode(
        struct inode            *inode)
 {
-       kmem_cache_free(linvfs_inode_zone, LINVFS_GET_VP(inode));
-}
-
-int
-xfs_inode_shake(
-       int             priority,
-       unsigned int    gfp_mask)
-{
-       int             pages;
-
-       
-       pages = kmem_zone_shrink(linvfs_inode_zone);
-       pages += kmem_zone_shrink(xfs_inode_zone);
-       return pages;
+       kmem_cache_free(linvfs_inode_cachep, LINVFS_GET_VP(inode));
 }
 
 STATIC void
@@ -333,12 +319,12 @@ init_once(
 STATIC int
 init_inodecache( void )
 {
-       linvfs_inode_zone = kmem_cache_create("linvfs_icache",
+       linvfs_inode_cachep = kmem_cache_create("linvfs_icache",
                                sizeof(vnode_t), 0,
                                SLAB_HWCACHE_ALIGN|SLAB_RECLAIM_ACCOUNT,
                                init_once, NULL);
 
-       if (linvfs_inode_zone == NULL)
+       if (linvfs_inode_cachep == NULL)
                return -ENOMEM;
        return 0;
 }
@@ -346,7 +332,7 @@ init_inodecache( void )
 STATIC void
 destroy_inodecache( void )
 {
-       if (kmem_cache_destroy(linvfs_inode_zone))
+       if (kmem_cache_destroy(linvfs_inode_cachep))
                printk(KERN_WARNING "%s: cache still in use!\n", __FUNCTION__);
 }
 
@@ -849,24 +835,15 @@ init_xfs_fs( void )
        vn_init();
        xfs_init();
        uuid_init();
+       vfs_initdmapi();
        vfs_initquota();
 
-       xfs_inode_shaker = kmem_shake_register(xfs_inode_shake);
-       if (!xfs_inode_shaker) {
-               error = -ENOMEM;
-               goto undo_shaker;
-       }
-
        error = register_filesystem(&xfs_fs_type);
        if (error)
                goto undo_register;
-       XFS_DM_INIT(&xfs_fs_type);
        return 0;
 
 undo_register:
-       kmem_shake_deregister(xfs_inode_shaker);
-
-undo_shaker:
        pagebuf_terminate();
 
 undo_pagebuf:
@@ -880,9 +857,8 @@ STATIC void __exit
 exit_xfs_fs( void )
 {
        vfs_exitquota();
-       XFS_DM_EXIT(&xfs_fs_type);
+       vfs_exitdmapi();
        unregister_filesystem(&xfs_fs_type);
-       kmem_shake_deregister(xfs_inode_shaker);
        xfs_cleanup();
        pagebuf_terminate();
        destroy_inodecache();