Skip to content

Commit 20c2df8

Browse files
committed
mm: Remove slab destructors from kmem_cache_create().
Slab destructors were no longer supported after Christoph's c59def9 change. They've been BUGs for both slab and slub, and slob never supported them either. This rips out support for the dtor pointer from kmem_cache_create() completely and fixes up every single callsite in the kernel (there were about 224, not including the slab allocator definitions themselves, or the documentation references). Signed-off-by: Paul Mundt <lethal@linux-sh.org>
1 parent 64fb98f commit 20c2df8

165 files changed

Lines changed: 247 additions & 268 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎arch/arm/plat-s3c24xx/dma.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1333,7 +1333,7 @@ int __init s3c24xx_dma_init(unsigned int channels, unsigned int irq,
13331333
dma_kmem = kmem_cache_create("dma_desc",
13341334
sizeof(struct s3c2410_dma_buf), 0,
13351335
SLAB_HWCACHE_ALIGN,
1336-
s3c2410_dma_cache_ctor, NULL);
1336+
s3c2410_dma_cache_ctor);
13371337

13381338
if (dma_kmem == NULL) {
13391339
printk(KERN_ERR "dma failed to make kmem cache\n");

‎arch/arm26/mm/memc.c‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -176,9 +176,9 @@ void __init pgtable_cache_init(void)
176176
{
177177
pte_cache = kmem_cache_create("pte-cache",
178178
sizeof(pte_t) * PTRS_PER_PTE,
179-
0, SLAB_PANIC, pte_cache_ctor, NULL);
179+
0, SLAB_PANIC, pte_cache_ctor);
180180

181181
pgd_cache = kmem_cache_create("pgd-cache", MEMC_TABLE_SIZE +
182182
sizeof(pgd_t) * PTRS_PER_PGD,
183-
0, SLAB_PANIC, pgd_cache_ctor, NULL);
183+
0, SLAB_PANIC, pgd_cache_ctor);
184184
}

‎arch/i386/mm/init.c‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -752,8 +752,7 @@ void __init pgtable_cache_init(void)
752752
PTRS_PER_PMD*sizeof(pmd_t),
753753
PTRS_PER_PMD*sizeof(pmd_t),
754754
SLAB_PANIC,
755-
pmd_ctor,
756-
NULL);
755+
pmd_ctor);
757756
if (!SHARED_KERNEL_PMD) {
758757
/* If we're in PAE mode and have a non-shared
759758
kernel pmd, then the pgd size must be a

‎arch/ia64/ia32/ia32_support.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -253,7 +253,7 @@ ia32_init (void)
253253

254254
partial_page_cachep = kmem_cache_create("partial_page_cache",
255255
sizeof(struct partial_page),
256-
0, SLAB_PANIC, NULL, NULL);
256+
0, SLAB_PANIC, NULL);
257257
}
258258
#endif
259259
return 0;

‎arch/powerpc/kernel/rtas_flash.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -804,7 +804,7 @@ int __init rtas_flash_init(void)
804804

805805
flash_block_cache = kmem_cache_create("rtas_flash_cache",
806806
RTAS_BLK_SIZE, RTAS_BLK_SIZE, 0,
807-
rtas_block_ctor, NULL);
807+
rtas_block_ctor);
808808
if (!flash_block_cache) {
809809
printk(KERN_ERR "%s: failed to create block cache\n",
810810
__FUNCTION__);

‎arch/powerpc/mm/hugetlbpage.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -542,7 +542,7 @@ static int __init hugetlbpage_init(void)
542542
HUGEPTE_TABLE_SIZE,
543543
HUGEPTE_TABLE_SIZE,
544544
0,
545-
zero_ctor, NULL);
545+
zero_ctor);
546546
if (! huge_pgtable_cache)
547547
panic("hugetlbpage_init(): could not create hugepte cache\n");
548548

‎arch/powerpc/mm/init_64.c‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,6 @@ void pgtable_cache_init(void)
178178
pgtable_cache[i] = kmem_cache_create(name,
179179
size, size,
180180
SLAB_PANIC,
181-
zero_ctor,
182-
NULL);
181+
zero_ctor);
183182
}
184183
}

‎arch/powerpc/platforms/cell/spufs/inode.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -654,7 +654,7 @@ static int __init spufs_init(void)
654654
ret = -ENOMEM;
655655
spufs_inode_cache = kmem_cache_create("spufs_inode_cache",
656656
sizeof(struct spufs_inode_info), 0,
657-
SLAB_HWCACHE_ALIGN, spufs_init_once, NULL);
657+
SLAB_HWCACHE_ALIGN, spufs_init_once);
658658

659659
if (!spufs_inode_cache)
660660
goto out;

‎arch/sh/kernel/cpu/sh4/sq.c‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -371,8 +371,7 @@ static int __init sq_api_init(void)
371371
printk(KERN_NOTICE "sq: Registering store queue API.\n");
372372

373373
sq_cache = kmem_cache_create("store_queue_cache",
374-
sizeof(struct sq_mapping), 0, 0,
375-
NULL, NULL);
374+
sizeof(struct sq_mapping), 0, 0, NULL);
376375
if (unlikely(!sq_cache))
377376
return ret;
378377

‎arch/sh/mm/pmb.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -310,7 +310,7 @@ static int __init pmb_init(void)
310310
BUG_ON(unlikely(nr_entries >= NR_PMB_ENTRIES));
311311

312312
pmb_cache = kmem_cache_create("pmb", sizeof(struct pmb_entry), 0,
313-
SLAB_PANIC, pmb_cache_ctor, NULL);
313+
SLAB_PANIC, pmb_cache_ctor);
314314

315315
jump_to_P2();
316316

0 commit comments

Comments
 (0)