]> bbs.cooldavid.org Git - net-next-2.6.git/blobdiff - fs/fat/cache.c
mm: Remove slab destructors from kmem_cache_create().
[net-next-2.6.git] / fs / fat / cache.c
index 82cc4f59e3bae3302abd291b392eccb90f4e1be4..be6f89b152caf6e69d3afb160eb508c65e46bd26 100644 (file)
@@ -34,15 +34,13 @@ static inline int fat_max_cache(struct inode *inode)
        return FAT_MAX_CACHE;
 }
 
-static kmem_cache_t *fat_cache_cachep;
+static struct kmem_cache *fat_cache_cachep;
 
-static void init_once(void *foo, kmem_cache_t *cachep, unsigned long flags)
+static void init_once(void *foo, struct kmem_cache *cachep, unsigned long flags)
 {
        struct fat_cache *cache = (struct fat_cache *)foo;
 
-       if ((flags & (SLAB_CTOR_VERIFY|SLAB_CTOR_CONSTRUCTOR)) ==
-           SLAB_CTOR_CONSTRUCTOR)
-               INIT_LIST_HEAD(&cache->cache_list);
+       INIT_LIST_HEAD(&cache->cache_list);
 }
 
 int __init fat_cache_init(void)
@@ -50,7 +48,7 @@ int __init fat_cache_init(void)
        fat_cache_cachep = kmem_cache_create("fat_cache",
                                sizeof(struct fat_cache),
                                0, SLAB_RECLAIM_ACCOUNT|SLAB_MEM_SPREAD,
-                               init_once, NULL);
+                               init_once);
        if (fat_cache_cachep == NULL)
                return -ENOMEM;
        return 0;
@@ -63,7 +61,7 @@ void fat_cache_destroy(void)
 
 static inline struct fat_cache *fat_cache_alloc(struct inode *inode)
 {
-       return kmem_cache_alloc(fat_cache_cachep, SLAB_KERNEL);
+       return kmem_cache_alloc(fat_cache_cachep, GFP_KERNEL);
 }
 
 static inline void fat_cache_free(struct fat_cache *cache)