diff options
Diffstat (limited to 'mm/slab.c')
-rw-r--r-- | mm/slab.c | 17 |
1 files changed, 7 insertions, 10 deletions
@@ -1484,7 +1484,7 @@ void __init kmem_cache_init(void) | |||
1484 | sizes[INDEX_AC].cs_size, | 1484 | sizes[INDEX_AC].cs_size, |
1485 | ARCH_KMALLOC_MINALIGN, | 1485 | ARCH_KMALLOC_MINALIGN, |
1486 | ARCH_KMALLOC_FLAGS|SLAB_PANIC, | 1486 | ARCH_KMALLOC_FLAGS|SLAB_PANIC, |
1487 | NULL, NULL); | 1487 | NULL); |
1488 | 1488 | ||
1489 | if (INDEX_AC != INDEX_L3) { | 1489 | if (INDEX_AC != INDEX_L3) { |
1490 | sizes[INDEX_L3].cs_cachep = | 1490 | sizes[INDEX_L3].cs_cachep = |
@@ -1492,7 +1492,7 @@ void __init kmem_cache_init(void) | |||
1492 | sizes[INDEX_L3].cs_size, | 1492 | sizes[INDEX_L3].cs_size, |
1493 | ARCH_KMALLOC_MINALIGN, | 1493 | ARCH_KMALLOC_MINALIGN, |
1494 | ARCH_KMALLOC_FLAGS|SLAB_PANIC, | 1494 | ARCH_KMALLOC_FLAGS|SLAB_PANIC, |
1495 | NULL, NULL); | 1495 | NULL); |
1496 | } | 1496 | } |
1497 | 1497 | ||
1498 | slab_early_init = 0; | 1498 | slab_early_init = 0; |
@@ -1510,7 +1510,7 @@ void __init kmem_cache_init(void) | |||
1510 | sizes->cs_size, | 1510 | sizes->cs_size, |
1511 | ARCH_KMALLOC_MINALIGN, | 1511 | ARCH_KMALLOC_MINALIGN, |
1512 | ARCH_KMALLOC_FLAGS|SLAB_PANIC, | 1512 | ARCH_KMALLOC_FLAGS|SLAB_PANIC, |
1513 | NULL, NULL); | 1513 | NULL); |
1514 | } | 1514 | } |
1515 | #ifdef CONFIG_ZONE_DMA | 1515 | #ifdef CONFIG_ZONE_DMA |
1516 | sizes->cs_dmacachep = kmem_cache_create( | 1516 | sizes->cs_dmacachep = kmem_cache_create( |
@@ -1519,7 +1519,7 @@ void __init kmem_cache_init(void) | |||
1519 | ARCH_KMALLOC_MINALIGN, | 1519 | ARCH_KMALLOC_MINALIGN, |
1520 | ARCH_KMALLOC_FLAGS|SLAB_CACHE_DMA| | 1520 | ARCH_KMALLOC_FLAGS|SLAB_CACHE_DMA| |
1521 | SLAB_PANIC, | 1521 | SLAB_PANIC, |
1522 | NULL, NULL); | 1522 | NULL); |
1523 | #endif | 1523 | #endif |
1524 | sizes++; | 1524 | sizes++; |
1525 | names++; | 1525 | names++; |
@@ -2101,12 +2101,10 @@ static int __init_refok setup_cpu_cache(struct kmem_cache *cachep) | |||
2101 | * @align: The required alignment for the objects. | 2101 | * @align: The required alignment for the objects. |
2102 | * @flags: SLAB flags | 2102 | * @flags: SLAB flags |
2103 | * @ctor: A constructor for the objects. | 2103 | * @ctor: A constructor for the objects. |
2104 | * @dtor: A destructor for the objects (not implemented anymore). | ||
2105 | * | 2104 | * |
2106 | * Returns a ptr to the cache on success, NULL on failure. | 2105 | * Returns a ptr to the cache on success, NULL on failure. |
2107 | * Cannot be called within a int, but can be interrupted. | 2106 | * Cannot be called within a int, but can be interrupted. |
2108 | * The @ctor is run when new pages are allocated by the cache | 2107 | * The @ctor is run when new pages are allocated by the cache. |
2109 | * and the @dtor is run before the pages are handed back. | ||
2110 | * | 2108 | * |
2111 | * @name must be valid until the cache is destroyed. This implies that | 2109 | * @name must be valid until the cache is destroyed. This implies that |
2112 | * the module calling this has to destroy the cache before getting unloaded. | 2110 | * the module calling this has to destroy the cache before getting unloaded. |
@@ -2126,8 +2124,7 @@ static int __init_refok setup_cpu_cache(struct kmem_cache *cachep) | |||
2126 | struct kmem_cache * | 2124 | struct kmem_cache * |
2127 | kmem_cache_create (const char *name, size_t size, size_t align, | 2125 | kmem_cache_create (const char *name, size_t size, size_t align, |
2128 | unsigned long flags, | 2126 | unsigned long flags, |
2129 | void (*ctor)(void*, struct kmem_cache *, unsigned long), | 2127 | void (*ctor)(void*, struct kmem_cache *, unsigned long)) |
2130 | void (*dtor)(void*, struct kmem_cache *, unsigned long)) | ||
2131 | { | 2128 | { |
2132 | size_t left_over, slab_size, ralign; | 2129 | size_t left_over, slab_size, ralign; |
2133 | struct kmem_cache *cachep = NULL, *pc; | 2130 | struct kmem_cache *cachep = NULL, *pc; |
@@ -2136,7 +2133,7 @@ kmem_cache_create (const char *name, size_t size, size_t align, | |||
2136 | * Sanity checks... these are all serious usage bugs. | 2133 | * Sanity checks... these are all serious usage bugs. |
2137 | */ | 2134 | */ |
2138 | if (!name || in_interrupt() || (size < BYTES_PER_WORD) || | 2135 | if (!name || in_interrupt() || (size < BYTES_PER_WORD) || |
2139 | size > KMALLOC_MAX_SIZE || dtor) { | 2136 | size > KMALLOC_MAX_SIZE) { |
2140 | printk(KERN_ERR "%s: Early error in slab %s\n", __FUNCTION__, | 2137 | printk(KERN_ERR "%s: Early error in slab %s\n", __FUNCTION__, |
2141 | name); | 2138 | name); |
2142 | BUG(); | 2139 | BUG(); |