Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 20c2df83 authored by Paul Mundt's avatar Paul Mundt
Browse files

mm: Remove slab destructors from kmem_cache_create().



Slab destructors were no longer supported after Christoph's
c59def9f 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: default avatarPaul Mundt <lethal@linux-sh.org>
parent 64fb98fc
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -1333,7 +1333,7 @@ int __init s3c24xx_dma_init(unsigned int channels, unsigned int irq,
	dma_kmem = kmem_cache_create("dma_desc",
				     sizeof(struct s3c2410_dma_buf), 0,
				     SLAB_HWCACHE_ALIGN,
				     s3c2410_dma_cache_ctor, NULL);
				     s3c2410_dma_cache_ctor);

	if (dma_kmem == NULL) {
		printk(KERN_ERR "dma failed to make kmem cache\n");
+2 −2
Original line number Diff line number Diff line
@@ -176,9 +176,9 @@ void __init pgtable_cache_init(void)
{
	pte_cache = kmem_cache_create("pte-cache",
				sizeof(pte_t) * PTRS_PER_PTE,
				0, SLAB_PANIC, pte_cache_ctor, NULL);
				0, SLAB_PANIC, pte_cache_ctor);

	pgd_cache = kmem_cache_create("pgd-cache", MEMC_TABLE_SIZE +
				sizeof(pgd_t) * PTRS_PER_PGD,
				0, SLAB_PANIC, pgd_cache_ctor, NULL);
				0, SLAB_PANIC, pgd_cache_ctor);
}
+1 −2
Original line number Diff line number Diff line
@@ -752,8 +752,7 @@ void __init pgtable_cache_init(void)
					PTRS_PER_PMD*sizeof(pmd_t),
					PTRS_PER_PMD*sizeof(pmd_t),
					SLAB_PANIC,
					pmd_ctor,
					NULL);
					pmd_ctor);
		if (!SHARED_KERNEL_PMD) {
			/* If we're in PAE mode and have a non-shared
			   kernel pmd, then the pgd size must be a
+1 −1
Original line number Diff line number Diff line
@@ -253,7 +253,7 @@ ia32_init (void)

		partial_page_cachep = kmem_cache_create("partial_page_cache",
						sizeof(struct partial_page),
						0, SLAB_PANIC, NULL, NULL);
						0, SLAB_PANIC, NULL);
	}
#endif
	return 0;
+1 −1
Original line number Diff line number Diff line
@@ -804,7 +804,7 @@ int __init rtas_flash_init(void)

	flash_block_cache = kmem_cache_create("rtas_flash_cache",
				RTAS_BLK_SIZE, RTAS_BLK_SIZE, 0,
				rtas_block_ctor, NULL);
				rtas_block_ctor);
	if (!flash_block_cache) {
		printk(KERN_ERR "%s: failed to create block cache\n",
				__FUNCTION__);
Loading