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

Commit 0e6b9c98 authored by Akinobu Mita's avatar Akinobu Mita Committed by Linus Torvalds
Browse files

use SLAB_PANIC flag cleanup



Use SLAB_PANIC and delete duplicated panic().

Signed-off-by: default avatarAkinobu Mita <akinobu.mita@gmail.com>
Cc: Ian Molton <spyro@f2s.com>
Cc: David Howells <dhowells@redhat.com>
Cc: Andi Kleen <ak@suse.de>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Paul Mundt <lethal@linux-sh.org>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 72280ede
Loading
Loading
Loading
Loading
+2 −6
Original line number Diff line number Diff line
@@ -176,13 +176,9 @@ void __init pgtable_cache_init(void)
{
	pte_cache = kmem_cache_create("pte-cache",
				sizeof(pte_t) * PTRS_PER_PTE,
				0, 0, pte_cache_ctor, NULL);
	if (!pte_cache)
		BUG();
				0, SLAB_PANIC, pte_cache_ctor, NULL);

	pgd_cache = kmem_cache_create("pgd-cache", MEMC_TABLE_SIZE +
				sizeof(pgd_t) * PTRS_PER_PGD,
				0, 0, pgd_cache_ctor, NULL);
	if (!pgd_cache)
		BUG();
				0, SLAB_PANIC, pgd_cache_ctor, NULL);
}
+1 −3
Original line number Diff line number Diff line
@@ -151,9 +151,7 @@ void __init pgtable_cache_init(void)
	pgd_cache = kmem_cache_create("pgd",
				      PTRS_PER_PGD * sizeof(pgd_t),
				      PTRS_PER_PGD * sizeof(pgd_t),
				      0,
				      SLAB_PANIC,
				      pgd_ctor,
				      pgd_dtor);
	if (!pgd_cache)
		panic("pgtable_cache_init(): Cannot create pgd cache");
}
+2 −7
Original line number Diff line number Diff line
@@ -751,12 +751,9 @@ void __init pgtable_cache_init(void)
		pmd_cache = kmem_cache_create("pmd",
					PTRS_PER_PMD*sizeof(pmd_t),
					PTRS_PER_PMD*sizeof(pmd_t),
					0,
					SLAB_PANIC,
					pmd_ctor,
					NULL);
		if (!pmd_cache)
			panic("pgtable_cache_init(): cannot create pmd cache");

		if (!SHARED_KERNEL_PMD) {
			/* If we're in PAE mode and have a non-shared
			   kernel pmd, then the pgd size must be a
@@ -770,11 +767,9 @@ void __init pgtable_cache_init(void)
	pgd_cache = kmem_cache_create("pgd",
				pgd_size,
				pgd_size,
				0,
				SLAB_PANIC,
				pgd_ctor,
				(!SHARED_KERNEL_PMD) ? pgd_dtor : NULL);
	if (!pgd_cache)
		panic("pgtable_cache_init(): Cannot create pgd cache");
}

/*
+2 −4
Original line number Diff line number Diff line
@@ -252,10 +252,8 @@ ia32_init (void)
		extern struct kmem_cache *partial_page_cachep;

		partial_page_cachep = kmem_cache_create("partial_page_cache",
							sizeof(struct partial_page), 0, 0,
							NULL, NULL);
		if (!partial_page_cachep)
			panic("Cannot create partial page SLAB cache");
						sizeof(struct partial_page),
						0, SLAB_PANIC, NULL, NULL);
	}
#endif
	return 0;
+1 −4
Original line number Diff line number Diff line
@@ -183,11 +183,8 @@ void pgtable_cache_init(void)
		    "for size: %08x...\n", name, i, size);
		pgtable_cache[i] = kmem_cache_create(name,
						     size, size,
						     0,
						     SLAB_PANIC,
						     zero_ctor,
						     NULL);
		if (! pgtable_cache[i])
			panic("pgtable_cache_init(): could not create %s!\n",
			      name);
	}
}
Loading