diff options
author | Paul Mundt <lethal@linux-sh.org> | 2007-07-19 21:11:58 -0400 |
---|---|---|
committer | Paul Mundt <lethal@linux-sh.org> | 2007-07-19 21:11:58 -0400 |
commit | 20c2df83d25c6a95affe6157a4c9cac4cf5ffaac (patch) | |
tree | 415c4453d2b17a50abe7a3e515177e1fa337bd67 | |
parent | 64fb98fc40738ae1a98bcea9ca3145b89fb71524 (diff) |
mm: Remove slab destructors from kmem_cache_create().
Slab destructors were no longer supported after Christoph's
c59def9f222d44bb7e2f0a559f2906191a0862d7 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>
165 files changed, 247 insertions, 268 deletions
diff --git a/arch/arm/plat-s3c24xx/dma.c b/arch/arm/plat-s3c24xx/dma.c index 08d80f2f51f2..6d048490c559 100644 --- a/arch/arm/plat-s3c24xx/dma.c +++ b/arch/arm/plat-s3c24xx/dma.c | |||
@@ -1333,7 +1333,7 @@ int __init s3c24xx_dma_init(unsigned int channels, unsigned int irq, | |||
1333 | dma_kmem = kmem_cache_create("dma_desc", | 1333 | dma_kmem = kmem_cache_create("dma_desc", |
1334 | sizeof(struct s3c2410_dma_buf), 0, | 1334 | sizeof(struct s3c2410_dma_buf), 0, |
1335 | SLAB_HWCACHE_ALIGN, | 1335 | SLAB_HWCACHE_ALIGN, |
1336 | s3c2410_dma_cache_ctor, NULL); | 1336 | s3c2410_dma_cache_ctor); |
1337 | 1337 | ||
1338 | if (dma_kmem == NULL) { | 1338 | if (dma_kmem == NULL) { |
1339 | printk(KERN_ERR "dma failed to make kmem cache\n"); | 1339 | printk(KERN_ERR "dma failed to make kmem cache\n"); |
diff --git a/arch/arm26/mm/memc.c b/arch/arm26/mm/memc.c index 42505541a9b1..ffecd8578247 100644 --- a/arch/arm26/mm/memc.c +++ b/arch/arm26/mm/memc.c | |||
@@ -176,9 +176,9 @@ void __init pgtable_cache_init(void) | |||
176 | { | 176 | { |
177 | pte_cache = kmem_cache_create("pte-cache", | 177 | pte_cache = kmem_cache_create("pte-cache", |
178 | sizeof(pte_t) * PTRS_PER_PTE, | 178 | sizeof(pte_t) * PTRS_PER_PTE, |
179 | 0, SLAB_PANIC, pte_cache_ctor, NULL); | 179 | 0, SLAB_PANIC, pte_cache_ctor); |
180 | 180 | ||
181 | pgd_cache = kmem_cache_create("pgd-cache", MEMC_TABLE_SIZE + | 181 | pgd_cache = kmem_cache_create("pgd-cache", MEMC_TABLE_SIZE + |
182 | sizeof(pgd_t) * PTRS_PER_PGD, | 182 | sizeof(pgd_t) * PTRS_PER_PGD, |
183 | 0, SLAB_PANIC, pgd_cache_ctor, NULL); | 183 | 0, SLAB_PANIC, pgd_cache_ctor); |
184 | } | 184 | } |
diff --git a/arch/i386/mm/init.c b/arch/i386/mm/init.c index 6a68b1ae061c..6e72f22e6bbd 100644 --- a/arch/i386/mm/init.c +++ b/arch/i386/mm/init.c | |||
@@ -752,8 +752,7 @@ void __init pgtable_cache_init(void) | |||
752 | PTRS_PER_PMD*sizeof(pmd_t), | 752 | PTRS_PER_PMD*sizeof(pmd_t), |
753 | PTRS_PER_PMD*sizeof(pmd_t), | 753 | PTRS_PER_PMD*sizeof(pmd_t), |
754 | SLAB_PANIC, | 754 | SLAB_PANIC, |
755 | pmd_ctor, | 755 | pmd_ctor); |
756 | NULL); | ||
757 | if (!SHARED_KERNEL_PMD) { | 756 | if (!SHARED_KERNEL_PMD) { |
758 | /* If we're in PAE mode and have a non-shared | 757 | /* If we're in PAE mode and have a non-shared |
759 | kernel pmd, then the pgd size must be a | 758 | kernel pmd, then the pgd size must be a |
diff --git a/arch/ia64/ia32/ia32_support.c b/arch/ia64/ia32/ia32_support.c index beea7a0b9dc6..e13a1a1db4b5 100644 --- a/arch/ia64/ia32/ia32_support.c +++ b/arch/ia64/ia32/ia32_support.c | |||
@@ -253,7 +253,7 @@ ia32_init (void) | |||
253 | 253 | ||
254 | partial_page_cachep = kmem_cache_create("partial_page_cache", | 254 | partial_page_cachep = kmem_cache_create("partial_page_cache", |
255 | sizeof(struct partial_page), | 255 | sizeof(struct partial_page), |
256 | 0, SLAB_PANIC, NULL, NULL); | 256 | 0, SLAB_PANIC, NULL); |
257 | } | 257 | } |
258 | #endif | 258 | #endif |
259 | return 0; | 259 | return 0; |
diff --git a/arch/powerpc/kernel/rtas_flash.c b/arch/powerpc/kernel/rtas_flash.c index f72118c0844f..62b7bf2f3eab 100644 --- a/arch/powerpc/kernel/rtas_flash.c +++ b/arch/powerpc/kernel/rtas_flash.c | |||
@@ -804,7 +804,7 @@ int __init rtas_flash_init(void) | |||
804 | 804 | ||
805 | flash_block_cache = kmem_cache_create("rtas_flash_cache", | 805 | flash_block_cache = kmem_cache_create("rtas_flash_cache", |
806 | RTAS_BLK_SIZE, RTAS_BLK_SIZE, 0, | 806 | RTAS_BLK_SIZE, RTAS_BLK_SIZE, 0, |
807 | rtas_block_ctor, NULL); | 807 | rtas_block_ctor); |
808 | if (!flash_block_cache) { | 808 | if (!flash_block_cache) { |
809 | printk(KERN_ERR "%s: failed to create block cache\n", | 809 | printk(KERN_ERR "%s: failed to create block cache\n", |
810 | __FUNCTION__); | 810 | __FUNCTION__); |
diff --git a/arch/powerpc/mm/hugetlbpage.c b/arch/powerpc/mm/hugetlbpage.c index 92a1b16fb7e3..4835f73af304 100644 --- a/arch/powerpc/mm/hugetlbpage.c +++ b/arch/powerpc/mm/hugetlbpage.c | |||
@@ -542,7 +542,7 @@ static int __init hugetlbpage_init(void) | |||
542 | HUGEPTE_TABLE_SIZE, | 542 | HUGEPTE_TABLE_SIZE, |
543 | HUGEPTE_TABLE_SIZE, | 543 | HUGEPTE_TABLE_SIZE, |
544 | 0, | 544 | 0, |
545 | zero_ctor, NULL); | 545 | zero_ctor); |
546 | if (! huge_pgtable_cache) | 546 | if (! huge_pgtable_cache) |
547 | panic("hugetlbpage_init(): could not create hugepte cache\n"); | 547 | panic("hugetlbpage_init(): could not create hugepte cache\n"); |
548 | 548 | ||
diff --git a/arch/powerpc/mm/init_64.c b/arch/powerpc/mm/init_64.c index 1d6edf724c85..9f27bb56a61d 100644 --- a/arch/powerpc/mm/init_64.c +++ b/arch/powerpc/mm/init_64.c | |||
@@ -178,7 +178,6 @@ void pgtable_cache_init(void) | |||
178 | pgtable_cache[i] = kmem_cache_create(name, | 178 | pgtable_cache[i] = kmem_cache_create(name, |
179 | size, size, | 179 | size, size, |
180 | SLAB_PANIC, | 180 | SLAB_PANIC, |
181 | zero_ctor, | 181 | zero_ctor); |
182 | NULL); | ||
183 | } | 182 | } |
184 | } | 183 | } |
diff --git a/arch/powerpc/platforms/cell/spufs/inode.c b/arch/powerpc/platforms/cell/spufs/inode.c index f37460e5bfd2..7eb4d6cbcb74 100644 --- a/arch/powerpc/platforms/cell/spufs/inode.c +++ b/arch/powerpc/platforms/cell/spufs/inode.c | |||
@@ -654,7 +654,7 @@ static int __init spufs_init(void) | |||
654 | ret = -ENOMEM; | 654 | ret = -ENOMEM; |
655 | spufs_inode_cache = kmem_cache_create("spufs_inode_cache", | 655 | spufs_inode_cache = kmem_cache_create("spufs_inode_cache", |
656 | sizeof(struct spufs_inode_info), 0, | 656 | sizeof(struct spufs_inode_info), 0, |
657 | SLAB_HWCACHE_ALIGN, spufs_init_once, NULL); | 657 | SLAB_HWCACHE_ALIGN, spufs_init_once); |
658 | 658 | ||
659 | if (!spufs_inode_cache) | 659 | if (!spufs_inode_cache) |
660 | goto out; | 660 | goto out; |
diff --git a/arch/sh/kernel/cpu/sh4/sq.c b/arch/sh/kernel/cpu/sh4/sq.c index d7fff752e569..b98d6c3e6f36 100644 --- a/arch/sh/kernel/cpu/sh4/sq.c +++ b/arch/sh/kernel/cpu/sh4/sq.c | |||
@@ -371,8 +371,7 @@ static int __init sq_api_init(void) | |||
371 | printk(KERN_NOTICE "sq: Registering store queue API.\n"); | 371 | printk(KERN_NOTICE "sq: Registering store queue API.\n"); |
372 | 372 | ||
373 | sq_cache = kmem_cache_create("store_queue_cache", | 373 | sq_cache = kmem_cache_create("store_queue_cache", |
374 | sizeof(struct sq_mapping), 0, 0, | 374 | sizeof(struct sq_mapping), 0, 0, NULL); |
375 | NULL, NULL); | ||
376 | if (unlikely(!sq_cache)) | 375 | if (unlikely(!sq_cache)) |
377 | return ret; | 376 | return ret; |
378 | 377 | ||
diff --git a/arch/sh/mm/pmb.c b/arch/sh/mm/pmb.c index b6a5a338145b..a08a4a958add 100644 --- a/arch/sh/mm/pmb.c +++ b/arch/sh/mm/pmb.c | |||
@@ -310,7 +310,7 @@ static int __init pmb_init(void) | |||
310 | BUG_ON(unlikely(nr_entries >= NR_PMB_ENTRIES)); | 310 | BUG_ON(unlikely(nr_entries >= NR_PMB_ENTRIES)); |
311 | 311 | ||
312 | pmb_cache = kmem_cache_create("pmb", sizeof(struct pmb_entry), 0, | 312 | pmb_cache = kmem_cache_create("pmb", sizeof(struct pmb_entry), 0, |
313 | SLAB_PANIC, pmb_cache_ctor, NULL); | 313 | SLAB_PANIC, pmb_cache_ctor); |
314 | 314 | ||
315 | jump_to_P2(); | 315 | jump_to_P2(); |
316 | 316 | ||
diff --git a/arch/sparc64/mm/tsb.c b/arch/sparc64/mm/tsb.c index 8eb8a7c76ec9..7ff0a02f5813 100644 --- a/arch/sparc64/mm/tsb.c +++ b/arch/sparc64/mm/tsb.c | |||
@@ -262,8 +262,7 @@ void __init pgtable_cache_init(void) | |||
262 | 262 | ||
263 | tsb_caches[i] = kmem_cache_create(name, | 263 | tsb_caches[i] = kmem_cache_create(name, |
264 | size, size, | 264 | size, size, |
265 | 0, | 265 | 0, NULL); |
266 | NULL, NULL); | ||
267 | if (!tsb_caches[i]) { | 266 | if (!tsb_caches[i]) { |
268 | prom_printf("Could not create %s cache\n", name); | 267 | prom_printf("Could not create %s cache\n", name); |
269 | prom_halt(); | 268 | prom_halt(); |
diff --git a/block/bsg.c b/block/bsg.c index baa04e7adf19..f2992e72b841 100644 --- a/block/bsg.c +++ b/block/bsg.c | |||
@@ -1043,7 +1043,7 @@ static int __init bsg_init(void) | |||
1043 | dev_t devid; | 1043 | dev_t devid; |
1044 | 1044 | ||
1045 | bsg_cmd_cachep = kmem_cache_create("bsg_cmd", | 1045 | bsg_cmd_cachep = kmem_cache_create("bsg_cmd", |
1046 | sizeof(struct bsg_command), 0, 0, NULL, NULL); | 1046 | sizeof(struct bsg_command), 0, 0, NULL); |
1047 | if (!bsg_cmd_cachep) { | 1047 | if (!bsg_cmd_cachep) { |
1048 | printk(KERN_ERR "bsg: failed creating slab cache\n"); | 1048 | printk(KERN_ERR "bsg: failed creating slab cache\n"); |
1049 | return -ENOMEM; | 1049 | return -ENOMEM; |
diff --git a/block/ll_rw_blk.c b/block/ll_rw_blk.c index d7cadf304168..66056ca5e631 100644 --- a/block/ll_rw_blk.c +++ b/block/ll_rw_blk.c | |||
@@ -3698,13 +3698,13 @@ int __init blk_dev_init(void) | |||
3698 | panic("Failed to create kblockd\n"); | 3698 | panic("Failed to create kblockd\n"); |
3699 | 3699 | ||
3700 | request_cachep = kmem_cache_create("blkdev_requests", | 3700 | request_cachep = kmem_cache_create("blkdev_requests", |
3701 | sizeof(struct request), 0, SLAB_PANIC, NULL, NULL); | 3701 | sizeof(struct request), 0, SLAB_PANIC, NULL); |
3702 | 3702 | ||
3703 | requestq_cachep = kmem_cache_create("blkdev_queue", | 3703 | requestq_cachep = kmem_cache_create("blkdev_queue", |
3704 | sizeof(request_queue_t), 0, SLAB_PANIC, NULL, NULL); | 3704 | sizeof(request_queue_t), 0, SLAB_PANIC, NULL); |
3705 | 3705 | ||
3706 | iocontext_cachep = kmem_cache_create("blkdev_ioc", | 3706 | iocontext_cachep = kmem_cache_create("blkdev_ioc", |
3707 | sizeof(struct io_context), 0, SLAB_PANIC, NULL, NULL); | 3707 | sizeof(struct io_context), 0, SLAB_PANIC, NULL); |
3708 | 3708 | ||
3709 | for_each_possible_cpu(i) | 3709 | for_each_possible_cpu(i) |
3710 | INIT_LIST_HEAD(&per_cpu(blk_cpu_done, i)); | 3710 | INIT_LIST_HEAD(&per_cpu(blk_cpu_done, i)); |
diff --git a/drivers/acpi/osl.c b/drivers/acpi/osl.c index 2e7ba615d760..00d53c2fd1e8 100644 --- a/drivers/acpi/osl.c +++ b/drivers/acpi/osl.c | |||
@@ -1098,7 +1098,7 @@ void acpi_os_release_lock(acpi_spinlock lockp, acpi_cpu_flags flags) | |||
1098 | acpi_status | 1098 | acpi_status |
1099 | acpi_os_create_cache(char *name, u16 size, u16 depth, acpi_cache_t ** cache) | 1099 | acpi_os_create_cache(char *name, u16 size, u16 depth, acpi_cache_t ** cache) |
1100 | { | 1100 | { |
1101 | *cache = kmem_cache_create(name, size, 0, 0, NULL, NULL); | 1101 | *cache = kmem_cache_create(name, size, 0, 0, NULL); |
1102 | if (*cache == NULL) | 1102 | if (*cache == NULL) |
1103 | return AE_ERROR; | 1103 | return AE_ERROR; |
1104 | else | 1104 | else |
diff --git a/drivers/block/aoe/aoeblk.c b/drivers/block/aoe/aoeblk.c index 478489c568a4..4f598270fa31 100644 --- a/drivers/block/aoe/aoeblk.c +++ b/drivers/block/aoe/aoeblk.c | |||
@@ -257,9 +257,9 @@ aoeblk_exit(void) | |||
257 | int __init | 257 | int __init |
258 | aoeblk_init(void) | 258 | aoeblk_init(void) |
259 | { | 259 | { |
260 | buf_pool_cache = kmem_cache_create("aoe_bufs", | 260 | buf_pool_cache = kmem_cache_create("aoe_bufs", |
261 | sizeof(struct buf), | 261 | sizeof(struct buf), |
262 | 0, 0, NULL, NULL); | 262 | 0, 0, NULL); |
263 | if (buf_pool_cache == NULL) | 263 | if (buf_pool_cache == NULL) |
264 | return -ENOMEM; | 264 | return -ENOMEM; |
265 | 265 | ||
diff --git a/drivers/ieee1394/eth1394.c b/drivers/ieee1394/eth1394.c index 93362eed94ed..3a9d7e2d4de6 100644 --- a/drivers/ieee1394/eth1394.c +++ b/drivers/ieee1394/eth1394.c | |||
@@ -1729,7 +1729,7 @@ static int __init ether1394_init_module(void) | |||
1729 | 1729 | ||
1730 | packet_task_cache = kmem_cache_create("packet_task", | 1730 | packet_task_cache = kmem_cache_create("packet_task", |
1731 | sizeof(struct packet_task), | 1731 | sizeof(struct packet_task), |
1732 | 0, 0, NULL, NULL); | 1732 | 0, 0, NULL); |
1733 | if (!packet_task_cache) | 1733 | if (!packet_task_cache) |
1734 | return -ENOMEM; | 1734 | return -ENOMEM; |
1735 | 1735 | ||
diff --git a/drivers/infiniband/core/mad.c b/drivers/infiniband/core/mad.c index 6b8faca02f8a..bc547f1d34ba 100644 --- a/drivers/infiniband/core/mad.c +++ b/drivers/infiniband/core/mad.c | |||
@@ -2998,7 +2998,6 @@ static int __init ib_mad_init_module(void) | |||
2998 | sizeof(struct ib_mad_private), | 2998 | sizeof(struct ib_mad_private), |
2999 | 0, | 2999 | 0, |
3000 | SLAB_HWCACHE_ALIGN, | 3000 | SLAB_HWCACHE_ALIGN, |
3001 | NULL, | ||
3002 | NULL); | 3001 | NULL); |
3003 | if (!ib_mad_cache) { | 3002 | if (!ib_mad_cache) { |
3004 | printk(KERN_ERR PFX "Couldn't create ib_mad cache\n"); | 3003 | printk(KERN_ERR PFX "Couldn't create ib_mad cache\n"); |
diff --git a/drivers/infiniband/hw/amso1100/c2_vq.c b/drivers/infiniband/hw/amso1100/c2_vq.c index 36620a22413c..cfdacb1ec279 100644 --- a/drivers/infiniband/hw/amso1100/c2_vq.c +++ b/drivers/infiniband/hw/amso1100/c2_vq.c | |||
@@ -85,7 +85,7 @@ int vq_init(struct c2_dev *c2dev) | |||
85 | (char) ('0' + c2dev->devnum)); | 85 | (char) ('0' + c2dev->devnum)); |
86 | c2dev->host_msg_cache = | 86 | c2dev->host_msg_cache = |
87 | kmem_cache_create(c2dev->vq_cache_name, c2dev->rep_vq.msg_size, 0, | 87 | kmem_cache_create(c2dev->vq_cache_name, c2dev->rep_vq.msg_size, 0, |
88 | SLAB_HWCACHE_ALIGN, NULL, NULL); | 88 | SLAB_HWCACHE_ALIGN, NULL); |
89 | if (c2dev->host_msg_cache == NULL) { | 89 | if (c2dev->host_msg_cache == NULL) { |
90 | return -ENOMEM; | 90 | return -ENOMEM; |
91 | } | 91 | } |
diff --git a/drivers/infiniband/hw/ehca/ehca_av.c b/drivers/infiniband/hw/ehca/ehca_av.c index e53a97af1260..97d108634c58 100644 --- a/drivers/infiniband/hw/ehca/ehca_av.c +++ b/drivers/infiniband/hw/ehca/ehca_av.c | |||
@@ -259,7 +259,7 @@ int ehca_init_av_cache(void) | |||
259 | av_cache = kmem_cache_create("ehca_cache_av", | 259 | av_cache = kmem_cache_create("ehca_cache_av", |
260 | sizeof(struct ehca_av), 0, | 260 | sizeof(struct ehca_av), 0, |
261 | SLAB_HWCACHE_ALIGN, | 261 | SLAB_HWCACHE_ALIGN, |
262 | NULL, NULL); | 262 | NULL); |
263 | if (!av_cache) | 263 | if (!av_cache) |
264 | return -ENOMEM; | 264 | return -ENOMEM; |
265 | return 0; | 265 | return 0; |
diff --git a/drivers/infiniband/hw/ehca/ehca_cq.c b/drivers/infiniband/hw/ehca/ehca_cq.c index 9e87883b561a..1e8ca3fca4aa 100644 --- a/drivers/infiniband/hw/ehca/ehca_cq.c +++ b/drivers/infiniband/hw/ehca/ehca_cq.c | |||
@@ -387,7 +387,7 @@ int ehca_init_cq_cache(void) | |||
387 | cq_cache = kmem_cache_create("ehca_cache_cq", | 387 | cq_cache = kmem_cache_create("ehca_cache_cq", |
388 | sizeof(struct ehca_cq), 0, | 388 | sizeof(struct ehca_cq), 0, |
389 | SLAB_HWCACHE_ALIGN, | 389 | SLAB_HWCACHE_ALIGN, |
390 | NULL, NULL); | 390 | NULL); |
391 | if (!cq_cache) | 391 | if (!cq_cache) |
392 | return -ENOMEM; | 392 | return -ENOMEM; |
393 | return 0; | 393 | return 0; |
diff --git a/drivers/infiniband/hw/ehca/ehca_main.c b/drivers/infiniband/hw/ehca/ehca_main.c index 36377c6db3d4..04c324330b7c 100644 --- a/drivers/infiniband/hw/ehca/ehca_main.c +++ b/drivers/infiniband/hw/ehca/ehca_main.c | |||
@@ -163,7 +163,7 @@ static int ehca_create_slab_caches(void) | |||
163 | ctblk_cache = kmem_cache_create("ehca_cache_ctblk", | 163 | ctblk_cache = kmem_cache_create("ehca_cache_ctblk", |
164 | EHCA_PAGESIZE, H_CB_ALIGNMENT, | 164 | EHCA_PAGESIZE, H_CB_ALIGNMENT, |
165 | SLAB_HWCACHE_ALIGN, | 165 | SLAB_HWCACHE_ALIGN, |
166 | NULL, NULL); | 166 | NULL); |
167 | if (!ctblk_cache) { | 167 | if (!ctblk_cache) { |
168 | ehca_gen_err("Cannot create ctblk SLAB cache."); | 168 | ehca_gen_err("Cannot create ctblk SLAB cache."); |
169 | ehca_cleanup_mrmw_cache(); | 169 | ehca_cleanup_mrmw_cache(); |
diff --git a/drivers/infiniband/hw/ehca/ehca_mrmw.c b/drivers/infiniband/hw/ehca/ehca_mrmw.c index 6262c5462d50..9f4c9d46e8ef 100644 --- a/drivers/infiniband/hw/ehca/ehca_mrmw.c +++ b/drivers/infiniband/hw/ehca/ehca_mrmw.c | |||
@@ -1950,13 +1950,13 @@ int ehca_init_mrmw_cache(void) | |||
1950 | mr_cache = kmem_cache_create("ehca_cache_mr", | 1950 | mr_cache = kmem_cache_create("ehca_cache_mr", |
1951 | sizeof(struct ehca_mr), 0, | 1951 | sizeof(struct ehca_mr), 0, |
1952 | SLAB_HWCACHE_ALIGN, | 1952 | SLAB_HWCACHE_ALIGN, |
1953 | NULL, NULL); | 1953 | NULL); |
1954 | if (!mr_cache) | 1954 | if (!mr_cache) |
1955 | return -ENOMEM; | 1955 | return -ENOMEM; |
1956 | mw_cache = kmem_cache_create("ehca_cache_mw", | 1956 | mw_cache = kmem_cache_create("ehca_cache_mw", |
1957 | sizeof(struct ehca_mw), 0, | 1957 | sizeof(struct ehca_mw), 0, |
1958 | SLAB_HWCACHE_ALIGN, | 1958 | SLAB_HWCACHE_ALIGN, |
1959 | NULL, NULL); | 1959 | NULL); |
1960 | if (!mw_cache) { | 1960 | if (!mw_cache) { |
1961 | kmem_cache_destroy(mr_cache); | 1961 | kmem_cache_destroy(mr_cache); |
1962 | mr_cache = NULL; | 1962 | mr_cache = NULL; |
diff --git a/drivers/infiniband/hw/ehca/ehca_pd.c b/drivers/infiniband/hw/ehca/ehca_pd.c index 79d0591a8043..c85312ad292b 100644 --- a/drivers/infiniband/hw/ehca/ehca_pd.c +++ b/drivers/infiniband/hw/ehca/ehca_pd.c | |||
@@ -100,7 +100,7 @@ int ehca_init_pd_cache(void) | |||
100 | pd_cache = kmem_cache_create("ehca_cache_pd", | 100 | pd_cache = kmem_cache_create("ehca_cache_pd", |
101 | sizeof(struct ehca_pd), 0, | 101 | sizeof(struct ehca_pd), 0, |
102 | SLAB_HWCACHE_ALIGN, | 102 | SLAB_HWCACHE_ALIGN, |
103 | NULL, NULL); | 103 | NULL); |
104 | if (!pd_cache) | 104 | if (!pd_cache) |
105 | return -ENOMEM; | 105 | return -ENOMEM; |
106 | return 0; | 106 | return 0; |
diff --git a/drivers/infiniband/hw/ehca/ehca_qp.c b/drivers/infiniband/hw/ehca/ehca_qp.c index 48e9ceacd6fa..a3146e696c5d 100644 --- a/drivers/infiniband/hw/ehca/ehca_qp.c +++ b/drivers/infiniband/hw/ehca/ehca_qp.c | |||
@@ -1760,7 +1760,7 @@ int ehca_init_qp_cache(void) | |||
1760 | qp_cache = kmem_cache_create("ehca_cache_qp", | 1760 | qp_cache = kmem_cache_create("ehca_cache_qp", |
1761 | sizeof(struct ehca_qp), 0, | 1761 | sizeof(struct ehca_qp), 0, |
1762 | SLAB_HWCACHE_ALIGN, | 1762 | SLAB_HWCACHE_ALIGN, |
1763 | NULL, NULL); | 1763 | NULL); |
1764 | if (!qp_cache) | 1764 | if (!qp_cache) |
1765 | return -ENOMEM; | 1765 | return -ENOMEM; |
1766 | return 0; | 1766 | return 0; |
diff --git a/drivers/infiniband/ulp/iser/iscsi_iser.c b/drivers/infiniband/ulp/iser/iscsi_iser.c index effdee299b0c..5db314380271 100644 --- a/drivers/infiniband/ulp/iser/iscsi_iser.c +++ b/drivers/infiniband/ulp/iser/iscsi_iser.c | |||
@@ -637,7 +637,7 @@ static int __init iser_init(void) | |||
637 | ig.desc_cache = kmem_cache_create("iser_descriptors", | 637 | ig.desc_cache = kmem_cache_create("iser_descriptors", |
638 | sizeof (struct iser_desc), | 638 | sizeof (struct iser_desc), |
639 | 0, SLAB_HWCACHE_ALIGN, | 639 | 0, SLAB_HWCACHE_ALIGN, |
640 | NULL, NULL); | 640 | NULL); |
641 | if (ig.desc_cache == NULL) | 641 | if (ig.desc_cache == NULL) |
642 | return -ENOMEM; | 642 | return -ENOMEM; |
643 | 643 | ||
diff --git a/drivers/kvm/mmu.c b/drivers/kvm/mmu.c index b297a6b111ac..1199d3f32ac3 100644 --- a/drivers/kvm/mmu.c +++ b/drivers/kvm/mmu.c | |||
@@ -1332,24 +1332,24 @@ int kvm_mmu_module_init(void) | |||
1332 | { | 1332 | { |
1333 | pte_chain_cache = kmem_cache_create("kvm_pte_chain", | 1333 | pte_chain_cache = kmem_cache_create("kvm_pte_chain", |
1334 | sizeof(struct kvm_pte_chain), | 1334 | sizeof(struct kvm_pte_chain), |
1335 | 0, 0, NULL, NULL); | 1335 | 0, 0, NULL); |
1336 | if (!pte_chain_cache) | 1336 | if (!pte_chain_cache) |
1337 | goto nomem; | 1337 | goto nomem; |
1338 | rmap_desc_cache = kmem_cache_create("kvm_rmap_desc", | 1338 | rmap_desc_cache = kmem_cache_create("kvm_rmap_desc", |
1339 | sizeof(struct kvm_rmap_desc), | 1339 | sizeof(struct kvm_rmap_desc), |
1340 | 0, 0, NULL, NULL); | 1340 | 0, 0, NULL); |
1341 | if (!rmap_desc_cache) | 1341 | if (!rmap_desc_cache) |
1342 | goto nomem; | 1342 | goto nomem; |
1343 | 1343 | ||
1344 | mmu_page_cache = kmem_cache_create("kvm_mmu_page", | 1344 | mmu_page_cache = kmem_cache_create("kvm_mmu_page", |
1345 | PAGE_SIZE, | 1345 | PAGE_SIZE, |
1346 | PAGE_SIZE, 0, NULL, NULL); | 1346 | PAGE_SIZE, 0, NULL); |
1347 | if (!mmu_page_cache) | 1347 | if (!mmu_page_cache) |
1348 | goto nomem; | 1348 | goto nomem; |
1349 | 1349 | ||
1350 | mmu_page_header_cache = kmem_cache_create("kvm_mmu_page_header", | 1350 | mmu_page_header_cache = kmem_cache_create("kvm_mmu_page_header", |
1351 | sizeof(struct kvm_mmu_page), | 1351 | sizeof(struct kvm_mmu_page), |
1352 | 0, 0, NULL, NULL); | 1352 | 0, 0, NULL); |
1353 | if (!mmu_page_header_cache) | 1353 | if (!mmu_page_header_cache) |
1354 | goto nomem; | 1354 | goto nomem; |
1355 | 1355 | ||
diff --git a/drivers/md/raid5.c b/drivers/md/raid5.c index 0b66afef2d82..c8dfdb302916 100644 --- a/drivers/md/raid5.c +++ b/drivers/md/raid5.c | |||
@@ -951,7 +951,7 @@ static int grow_stripes(raid5_conf_t *conf, int num) | |||
951 | conf->active_name = 0; | 951 | conf->active_name = 0; |
952 | sc = kmem_cache_create(conf->cache_name[conf->active_name], | 952 | sc = kmem_cache_create(conf->cache_name[conf->active_name], |
953 | sizeof(struct stripe_head)+(devs-1)*sizeof(struct r5dev), | 953 | sizeof(struct stripe_head)+(devs-1)*sizeof(struct r5dev), |
954 | 0, 0, NULL, NULL); | 954 | 0, 0, NULL); |
955 | if (!sc) | 955 | if (!sc) |
956 | return 1; | 956 | return 1; |
957 | conf->slab_cache = sc; | 957 | conf->slab_cache = sc; |
@@ -1003,7 +1003,7 @@ static int resize_stripes(raid5_conf_t *conf, int newsize) | |||
1003 | /* Step 1 */ | 1003 | /* Step 1 */ |
1004 | sc = kmem_cache_create(conf->cache_name[1-conf->active_name], | 1004 | sc = kmem_cache_create(conf->cache_name[1-conf->active_name], |
1005 | sizeof(struct stripe_head)+(newsize-1)*sizeof(struct r5dev), | 1005 | sizeof(struct stripe_head)+(newsize-1)*sizeof(struct r5dev), |
1006 | 0, 0, NULL, NULL); | 1006 | 0, 0, NULL); |
1007 | if (!sc) | 1007 | if (!sc) |
1008 | return -ENOMEM; | 1008 | return -ENOMEM; |
1009 | 1009 | ||
diff --git a/drivers/message/i2o/i2o_block.c b/drivers/message/i2o/i2o_block.c index 64a52bd7544a..988c8ce47f58 100644 --- a/drivers/message/i2o/i2o_block.c +++ b/drivers/message/i2o/i2o_block.c | |||
@@ -1171,8 +1171,7 @@ static int __init i2o_block_init(void) | |||
1171 | /* Allocate request mempool and slab */ | 1171 | /* Allocate request mempool and slab */ |
1172 | size = sizeof(struct i2o_block_request); | 1172 | size = sizeof(struct i2o_block_request); |
1173 | i2o_blk_req_pool.slab = kmem_cache_create("i2o_block_req", size, 0, | 1173 | i2o_blk_req_pool.slab = kmem_cache_create("i2o_block_req", size, 0, |
1174 | SLAB_HWCACHE_ALIGN, NULL, | 1174 | SLAB_HWCACHE_ALIGN, NULL); |
1175 | NULL); | ||
1176 | if (!i2o_blk_req_pool.slab) { | 1175 | if (!i2o_blk_req_pool.slab) { |
1177 | osm_err("can't init request slab\n"); | 1176 | osm_err("can't init request slab\n"); |
1178 | rc = -ENOMEM; | 1177 | rc = -ENOMEM; |
diff --git a/drivers/mtd/ubi/eba.c b/drivers/mtd/ubi/eba.c index 8aff9385613f..7c5e29eaf118 100644 --- a/drivers/mtd/ubi/eba.c +++ b/drivers/mtd/ubi/eba.c | |||
@@ -1149,7 +1149,7 @@ int ubi_eba_init_scan(struct ubi_device *ubi, struct ubi_scan_info *si) | |||
1149 | if (ubi_devices_cnt == 0) { | 1149 | if (ubi_devices_cnt == 0) { |
1150 | ltree_slab = kmem_cache_create("ubi_ltree_slab", | 1150 | ltree_slab = kmem_cache_create("ubi_ltree_slab", |
1151 | sizeof(struct ltree_entry), 0, | 1151 | sizeof(struct ltree_entry), 0, |
1152 | 0, <ree_entry_ctor, NULL); | 1152 | 0, <ree_entry_ctor); |
1153 | if (!ltree_slab) | 1153 | if (!ltree_slab) |
1154 | return -ENOMEM; | 1154 | return -ENOMEM; |
1155 | } | 1155 | } |
diff --git a/drivers/mtd/ubi/wl.c b/drivers/mtd/ubi/wl.c index 9de953762097..a5a9b8d87302 100644 --- a/drivers/mtd/ubi/wl.c +++ b/drivers/mtd/ubi/wl.c | |||
@@ -1452,7 +1452,7 @@ int ubi_wl_init_scan(struct ubi_device *ubi, struct ubi_scan_info *si) | |||
1452 | if (ubi_devices_cnt == 0) { | 1452 | if (ubi_devices_cnt == 0) { |
1453 | wl_entries_slab = kmem_cache_create("ubi_wl_entry_slab", | 1453 | wl_entries_slab = kmem_cache_create("ubi_wl_entry_slab", |
1454 | sizeof(struct ubi_wl_entry), | 1454 | sizeof(struct ubi_wl_entry), |
1455 | 0, 0, NULL, NULL); | 1455 | 0, 0, NULL); |
1456 | if (!wl_entries_slab) | 1456 | if (!wl_entries_slab) |
1457 | return -ENOMEM; | 1457 | return -ENOMEM; |
1458 | } | 1458 | } |
diff --git a/drivers/s390/block/dasd_devmap.c b/drivers/s390/block/dasd_devmap.c index 6a89cefe99bb..0c67258fb9ec 100644 --- a/drivers/s390/block/dasd_devmap.c +++ b/drivers/s390/block/dasd_devmap.c | |||
@@ -291,7 +291,7 @@ dasd_parse_keyword( char *parsestring ) { | |||
291 | dasd_page_cache = | 291 | dasd_page_cache = |
292 | kmem_cache_create("dasd_page_cache", PAGE_SIZE, | 292 | kmem_cache_create("dasd_page_cache", PAGE_SIZE, |
293 | PAGE_SIZE, SLAB_CACHE_DMA, | 293 | PAGE_SIZE, SLAB_CACHE_DMA, |
294 | NULL, NULL ); | 294 | NULL); |
295 | if (!dasd_page_cache) | 295 | if (!dasd_page_cache) |
296 | MESSAGE(KERN_WARNING, "%s", "Failed to create slab, " | 296 | MESSAGE(KERN_WARNING, "%s", "Failed to create slab, " |
297 | "fixed buffer mode disabled."); | 297 | "fixed buffer mode disabled."); |
diff --git a/drivers/s390/scsi/zfcp_aux.c b/drivers/s390/scsi/zfcp_aux.c index a1db95925138..9726261c367d 100644 --- a/drivers/s390/scsi/zfcp_aux.c +++ b/drivers/s390/scsi/zfcp_aux.c | |||
@@ -259,21 +259,21 @@ zfcp_module_init(void) | |||
259 | size = sizeof(struct zfcp_fsf_req_qtcb); | 259 | size = sizeof(struct zfcp_fsf_req_qtcb); |
260 | align = calc_alignment(size); | 260 | align = calc_alignment(size); |
261 | zfcp_data.fsf_req_qtcb_cache = | 261 | zfcp_data.fsf_req_qtcb_cache = |
262 | kmem_cache_create("zfcp_fsf", size, align, 0, NULL, NULL); | 262 | kmem_cache_create("zfcp_fsf", size, align, 0, NULL); |
263 | if (!zfcp_data.fsf_req_qtcb_cache) | 263 | if (!zfcp_data.fsf_req_qtcb_cache) |
264 | goto out; | 264 | goto out; |
265 | 265 | ||
266 | size = sizeof(struct fsf_status_read_buffer); | 266 | size = sizeof(struct fsf_status_read_buffer); |
267 | align = calc_alignment(size); | 267 | align = calc_alignment(size); |
268 | zfcp_data.sr_buffer_cache = | 268 | zfcp_data.sr_buffer_cache = |
269 | kmem_cache_create("zfcp_sr", size, align, 0, NULL, NULL); | 269 | kmem_cache_create("zfcp_sr", size, align, 0, NULL); |
270 | if (!zfcp_data.sr_buffer_cache) | 270 | if (!zfcp_data.sr_buffer_cache) |
271 | goto out_sr_cache; | 271 | goto out_sr_cache; |
272 | 272 | ||
273 | size = sizeof(struct zfcp_gid_pn_data); | 273 | size = sizeof(struct zfcp_gid_pn_data); |
274 | align = calc_alignment(size); | 274 | align = calc_alignment(size); |
275 | zfcp_data.gid_pn_cache = | 275 | zfcp_data.gid_pn_cache = |
276 | kmem_cache_create("zfcp_gid", size, align, 0, NULL, NULL); | 276 | kmem_cache_create("zfcp_gid", size, align, 0, NULL); |
277 | if (!zfcp_data.gid_pn_cache) | 277 | if (!zfcp_data.gid_pn_cache) |
278 | goto out_gid_cache; | 278 | goto out_gid_cache; |
279 | 279 | ||
diff --git a/drivers/scsi/aic94xx/aic94xx_init.c b/drivers/scsi/aic94xx/aic94xx_init.c index 1c0d7578e791..b8c6810090d5 100644 --- a/drivers/scsi/aic94xx/aic94xx_init.c +++ b/drivers/scsi/aic94xx/aic94xx_init.c | |||
@@ -462,7 +462,7 @@ static int asd_create_global_caches(void) | |||
462 | sizeof(struct asd_dma_tok), | 462 | sizeof(struct asd_dma_tok), |
463 | 0, | 463 | 0, |
464 | SLAB_HWCACHE_ALIGN, | 464 | SLAB_HWCACHE_ALIGN, |
465 | NULL, NULL); | 465 | NULL); |
466 | if (!asd_dma_token_cache) { | 466 | if (!asd_dma_token_cache) { |
467 | asd_printk("couldn't create dma token cache\n"); | 467 | asd_printk("couldn't create dma token cache\n"); |
468 | return -ENOMEM; | 468 | return -ENOMEM; |
@@ -474,7 +474,7 @@ static int asd_create_global_caches(void) | |||
474 | sizeof(struct asd_ascb), | 474 | sizeof(struct asd_ascb), |
475 | 0, | 475 | 0, |
476 | SLAB_HWCACHE_ALIGN, | 476 | SLAB_HWCACHE_ALIGN, |
477 | NULL, NULL); | 477 | NULL); |
478 | if (!asd_ascb_cache) { | 478 | if (!asd_ascb_cache) { |
479 | asd_printk("couldn't create ascb cache\n"); | 479 | asd_printk("couldn't create ascb cache\n"); |
480 | goto Err; | 480 | goto Err; |
diff --git a/drivers/scsi/libsas/sas_init.c b/drivers/scsi/libsas/sas_init.c index 965698c8b7bf..1396c83b0c9c 100644 --- a/drivers/scsi/libsas/sas_init.c +++ b/drivers/scsi/libsas/sas_init.c | |||
@@ -292,7 +292,7 @@ EXPORT_SYMBOL_GPL(sas_domain_release_transport); | |||
292 | static int __init sas_class_init(void) | 292 | static int __init sas_class_init(void) |
293 | { | 293 | { |
294 | sas_task_cache = kmem_cache_create("sas_task", sizeof(struct sas_task), | 294 | sas_task_cache = kmem_cache_create("sas_task", sizeof(struct sas_task), |
295 | 0, SLAB_HWCACHE_ALIGN, NULL, NULL); | 295 | 0, SLAB_HWCACHE_ALIGN, NULL); |
296 | if (!sas_task_cache) | 296 | if (!sas_task_cache) |
297 | return -ENOMEM; | 297 | return -ENOMEM; |
298 | 298 | ||
diff --git a/drivers/scsi/qla2xxx/qla_os.c b/drivers/scsi/qla2xxx/qla_os.c index b5a77b0c0deb..92376f9dfdd5 100644 --- a/drivers/scsi/qla2xxx/qla_os.c +++ b/drivers/scsi/qla2xxx/qla_os.c | |||
@@ -2723,7 +2723,7 @@ qla2x00_module_init(void) | |||
2723 | 2723 | ||
2724 | /* Allocate cache for SRBs. */ | 2724 | /* Allocate cache for SRBs. */ |
2725 | srb_cachep = kmem_cache_create("qla2xxx_srbs", sizeof(srb_t), 0, | 2725 | srb_cachep = kmem_cache_create("qla2xxx_srbs", sizeof(srb_t), 0, |
2726 | SLAB_HWCACHE_ALIGN, NULL, NULL); | 2726 | SLAB_HWCACHE_ALIGN, NULL); |
2727 | if (srb_cachep == NULL) { | 2727 | if (srb_cachep == NULL) { |
2728 | printk(KERN_ERR | 2728 | printk(KERN_ERR |
2729 | "qla2xxx: Unable to allocate SRB cache...Failing load!\n"); | 2729 | "qla2xxx: Unable to allocate SRB cache...Failing load!\n"); |
diff --git a/drivers/scsi/qla4xxx/ql4_os.c b/drivers/scsi/qla4xxx/ql4_os.c index e69160a7bc60..b1d565c12c5b 100644 --- a/drivers/scsi/qla4xxx/ql4_os.c +++ b/drivers/scsi/qla4xxx/ql4_os.c | |||
@@ -1677,7 +1677,7 @@ static int __init qla4xxx_module_init(void) | |||
1677 | 1677 | ||
1678 | /* Allocate cache for SRBs. */ | 1678 | /* Allocate cache for SRBs. */ |
1679 | srb_cachep = kmem_cache_create("qla4xxx_srbs", sizeof(struct srb), 0, | 1679 | srb_cachep = kmem_cache_create("qla4xxx_srbs", sizeof(struct srb), 0, |
1680 | SLAB_HWCACHE_ALIGN, NULL, NULL); | 1680 | SLAB_HWCACHE_ALIGN, NULL); |
1681 | if (srb_cachep == NULL) { | 1681 | if (srb_cachep == NULL) { |
1682 | printk(KERN_ERR | 1682 | printk(KERN_ERR |
1683 | "%s: Unable to allocate SRB cache..." | 1683 | "%s: Unable to allocate SRB cache..." |
diff --git a/drivers/scsi/scsi.c b/drivers/scsi/scsi.c index a691dda40d2c..a5de1a829a76 100644 --- a/drivers/scsi/scsi.c +++ b/drivers/scsi/scsi.c | |||
@@ -288,7 +288,7 @@ int scsi_setup_command_freelist(struct Scsi_Host *shost) | |||
288 | if (!pool->users) { | 288 | if (!pool->users) { |
289 | pool->slab = kmem_cache_create(pool->name, | 289 | pool->slab = kmem_cache_create(pool->name, |
290 | sizeof(struct scsi_cmnd), 0, | 290 | sizeof(struct scsi_cmnd), 0, |
291 | pool->slab_flags, NULL, NULL); | 291 | pool->slab_flags, NULL); |
292 | if (!pool->slab) | 292 | if (!pool->slab) |
293 | goto fail; | 293 | goto fail; |
294 | } | 294 | } |
diff --git a/drivers/scsi/scsi_lib.c b/drivers/scsi/scsi_lib.c index 1f5a07bf2a75..da63c544919b 100644 --- a/drivers/scsi/scsi_lib.c +++ b/drivers/scsi/scsi_lib.c | |||
@@ -1661,7 +1661,7 @@ int __init scsi_init_queue(void) | |||
1661 | 1661 | ||
1662 | scsi_io_context_cache = kmem_cache_create("scsi_io_context", | 1662 | scsi_io_context_cache = kmem_cache_create("scsi_io_context", |
1663 | sizeof(struct scsi_io_context), | 1663 | sizeof(struct scsi_io_context), |
1664 | 0, 0, NULL, NULL); | 1664 | 0, 0, NULL); |
1665 | if (!scsi_io_context_cache) { | 1665 | if (!scsi_io_context_cache) { |
1666 | printk(KERN_ERR "SCSI: can't init scsi io context cache\n"); | 1666 | printk(KERN_ERR "SCSI: can't init scsi io context cache\n"); |
1667 | return -ENOMEM; | 1667 | return -ENOMEM; |
@@ -1672,7 +1672,7 @@ int __init scsi_init_queue(void) | |||
1672 | int size = sgp->size * sizeof(struct scatterlist); | 1672 | int size = sgp->size * sizeof(struct scatterlist); |
1673 | 1673 | ||
1674 | sgp->slab = kmem_cache_create(sgp->name, size, 0, | 1674 | sgp->slab = kmem_cache_create(sgp->name, size, 0, |
1675 | SLAB_HWCACHE_ALIGN, NULL, NULL); | 1675 | SLAB_HWCACHE_ALIGN, NULL); |
1676 | if (!sgp->slab) { | 1676 | if (!sgp->slab) { |
1677 | printk(KERN_ERR "SCSI: can't init sg slab %s\n", | 1677 | printk(KERN_ERR "SCSI: can't init sg slab %s\n", |
1678 | sgp->name); | 1678 | sgp->name); |
diff --git a/drivers/scsi/scsi_tgt_lib.c b/drivers/scsi/scsi_tgt_lib.c index 2570f48a69c7..371b69c110bc 100644 --- a/drivers/scsi/scsi_tgt_lib.c +++ b/drivers/scsi/scsi_tgt_lib.c | |||
@@ -585,7 +585,7 @@ static int __init scsi_tgt_init(void) | |||
585 | 585 | ||
586 | scsi_tgt_cmd_cache = kmem_cache_create("scsi_tgt_cmd", | 586 | scsi_tgt_cmd_cache = kmem_cache_create("scsi_tgt_cmd", |
587 | sizeof(struct scsi_tgt_cmd), | 587 | sizeof(struct scsi_tgt_cmd), |
588 | 0, 0, NULL, NULL); | 588 | 0, 0, NULL); |
589 | if (!scsi_tgt_cmd_cache) | 589 | if (!scsi_tgt_cmd_cache) |
590 | return -ENOMEM; | 590 | return -ENOMEM; |
591 | 591 | ||
diff --git a/drivers/usb/host/uhci-hcd.c b/drivers/usb/host/uhci-hcd.c index 76c555a67dac..805e5fc5f5db 100644 --- a/drivers/usb/host/uhci-hcd.c +++ b/drivers/usb/host/uhci-hcd.c | |||
@@ -933,7 +933,7 @@ static int __init uhci_hcd_init(void) | |||
933 | } | 933 | } |
934 | 934 | ||
935 | uhci_up_cachep = kmem_cache_create("uhci_urb_priv", | 935 | uhci_up_cachep = kmem_cache_create("uhci_urb_priv", |
936 | sizeof(struct urb_priv), 0, 0, NULL, NULL); | 936 | sizeof(struct urb_priv), 0, 0, NULL); |
937 | if (!uhci_up_cachep) | 937 | if (!uhci_up_cachep) |
938 | goto up_failed; | 938 | goto up_failed; |
939 | 939 | ||
diff --git a/drivers/usb/mon/mon_text.c b/drivers/usb/mon/mon_text.c index 982b773d71e6..8f27a9e1c36b 100644 --- a/drivers/usb/mon/mon_text.c +++ b/drivers/usb/mon/mon_text.c | |||
@@ -340,7 +340,7 @@ static int mon_text_open(struct inode *inode, struct file *file) | |||
340 | snprintf(rp->slab_name, SLAB_NAME_SZ, "mon_text_%p", rp); | 340 | snprintf(rp->slab_name, SLAB_NAME_SZ, "mon_text_%p", rp); |
341 | rp->e_slab = kmem_cache_create(rp->slab_name, | 341 | rp->e_slab = kmem_cache_create(rp->slab_name, |
342 | sizeof(struct mon_event_text), sizeof(long), 0, | 342 | sizeof(struct mon_event_text), sizeof(long), 0, |
343 | mon_text_ctor, NULL); | 343 | mon_text_ctor); |
344 | if (rp->e_slab == NULL) { | 344 | if (rp->e_slab == NULL) { |
345 | rc = -ENOMEM; | 345 | rc = -ENOMEM; |
346 | goto err_slab; | 346 | goto err_slab; |
diff --git a/fs/adfs/super.c b/fs/adfs/super.c index de2ed5ca3351..1c9fd3029496 100644 --- a/fs/adfs/super.c +++ b/fs/adfs/super.c | |||
@@ -234,14 +234,14 @@ static void init_once(void * foo, struct kmem_cache * cachep, unsigned long flag | |||
234 | 234 | ||
235 | inode_init_once(&ei->vfs_inode); | 235 | inode_init_once(&ei->vfs_inode); |
236 | } | 236 | } |
237 | 237 | ||
238 | static int init_inodecache(void) | 238 | static int init_inodecache(void) |
239 | { | 239 | { |
240 | adfs_inode_cachep = kmem_cache_create("adfs_inode_cache", | 240 | adfs_inode_cachep = kmem_cache_create("adfs_inode_cache", |
241 | sizeof(struct adfs_inode_info), | 241 | sizeof(struct adfs_inode_info), |
242 | 0, (SLAB_RECLAIM_ACCOUNT| | 242 | 0, (SLAB_RECLAIM_ACCOUNT| |
243 | SLAB_MEM_SPREAD), | 243 | SLAB_MEM_SPREAD), |
244 | init_once, NULL); | 244 | init_once); |
245 | if (adfs_inode_cachep == NULL) | 245 | if (adfs_inode_cachep == NULL) |
246 | return -ENOMEM; | 246 | return -ENOMEM; |
247 | return 0; | 247 | return 0; |
diff --git a/fs/affs/super.c b/fs/affs/super.c index 6d0ebc321530..c80191ae2059 100644 --- a/fs/affs/super.c +++ b/fs/affs/super.c | |||
@@ -99,7 +99,7 @@ static int init_inodecache(void) | |||
99 | sizeof(struct affs_inode_info), | 99 | sizeof(struct affs_inode_info), |
100 | 0, (SLAB_RECLAIM_ACCOUNT| | 100 | 0, (SLAB_RECLAIM_ACCOUNT| |
101 | SLAB_MEM_SPREAD), | 101 | SLAB_MEM_SPREAD), |
102 | init_once, NULL); | 102 | init_once); |
103 | if (affs_inode_cachep == NULL) | 103 | if (affs_inode_cachep == NULL) |
104 | return -ENOMEM; | 104 | return -ENOMEM; |
105 | return 0; | 105 | return 0; |
diff --git a/fs/afs/super.c b/fs/afs/super.c index 993cdf1cce3a..b8808b40f82b 100644 --- a/fs/afs/super.c +++ b/fs/afs/super.c | |||
@@ -89,8 +89,7 @@ int __init afs_fs_init(void) | |||
89 | sizeof(struct afs_vnode), | 89 | sizeof(struct afs_vnode), |
90 | 0, | 90 | 0, |
91 | SLAB_HWCACHE_ALIGN, | 91 | SLAB_HWCACHE_ALIGN, |
92 | afs_i_init_once, | 92 | afs_i_init_once); |
93 | NULL); | ||
94 | if (!afs_inode_cachep) { | 93 | if (!afs_inode_cachep) { |
95 | printk(KERN_NOTICE "kAFS: Failed to allocate inode cache\n"); | 94 | printk(KERN_NOTICE "kAFS: Failed to allocate inode cache\n"); |
96 | return ret; | 95 | return ret; |
diff --git a/fs/befs/linuxvfs.c b/fs/befs/linuxvfs.c index a5c5171c2828..a45141827681 100644 --- a/fs/befs/linuxvfs.c +++ b/fs/befs/linuxvfs.c | |||
@@ -414,7 +414,7 @@ befs_read_inode(struct inode *inode) | |||
414 | } | 414 | } |
415 | 415 | ||
416 | /* Initialize the inode cache. Called at fs setup. | 416 | /* Initialize the inode cache. Called at fs setup. |
417 | * | 417 | * |
418 | * Taken from NFS implementation by Al Viro. | 418 | * Taken from NFS implementation by Al Viro. |
419 | */ | 419 | */ |
420 | static int | 420 | static int |
@@ -424,7 +424,7 @@ befs_init_inodecache(void) | |||
424 | sizeof (struct befs_inode_info), | 424 | sizeof (struct befs_inode_info), |
425 | 0, (SLAB_RECLAIM_ACCOUNT| | 425 | 0, (SLAB_RECLAIM_ACCOUNT| |
426 | SLAB_MEM_SPREAD), | 426 | SLAB_MEM_SPREAD), |
427 | init_once, NULL); | 427 | init_once); |
428 | if (befs_inode_cachep == NULL) { | 428 | if (befs_inode_cachep == NULL) { |
429 | printk(KERN_ERR "befs_init_inodecache: " | 429 | printk(KERN_ERR "befs_init_inodecache: " |
430 | "Couldn't initalize inode slabcache\n"); | 430 | "Couldn't initalize inode slabcache\n"); |
diff --git a/fs/bfs/inode.c b/fs/bfs/inode.c index 58c7bd9f5301..f346eb14e86f 100644 --- a/fs/bfs/inode.c +++ b/fs/bfs/inode.c | |||
@@ -250,14 +250,14 @@ static void init_once(void * foo, struct kmem_cache * cachep, unsigned long flag | |||
250 | 250 | ||
251 | inode_init_once(&bi->vfs_inode); | 251 | inode_init_once(&bi->vfs_inode); |
252 | } | 252 | } |
253 | 253 | ||
254 | static int init_inodecache(void) | 254 | static int init_inodecache(void) |
255 | { | 255 | { |
256 | bfs_inode_cachep = kmem_cache_create("bfs_inode_cache", | 256 | bfs_inode_cachep = kmem_cache_create("bfs_inode_cache", |
257 | sizeof(struct bfs_inode_info), | 257 | sizeof(struct bfs_inode_info), |
258 | 0, (SLAB_RECLAIM_ACCOUNT| | 258 | 0, (SLAB_RECLAIM_ACCOUNT| |
259 | SLAB_MEM_SPREAD), | 259 | SLAB_MEM_SPREAD), |
260 | init_once, NULL); | 260 | init_once); |
261 | if (bfs_inode_cachep == NULL) | 261 | if (bfs_inode_cachep == NULL) |
262 | return -ENOMEM; | 262 | return -ENOMEM; |
263 | return 0; | 263 | return 0; |
@@ -1187,7 +1187,7 @@ static void __init biovec_init_slabs(void) | |||
1187 | 1187 | ||
1188 | size = bvs->nr_vecs * sizeof(struct bio_vec); | 1188 | size = bvs->nr_vecs * sizeof(struct bio_vec); |
1189 | bvs->slab = kmem_cache_create(bvs->name, size, 0, | 1189 | bvs->slab = kmem_cache_create(bvs->name, size, 0, |
1190 | SLAB_HWCACHE_ALIGN|SLAB_PANIC, NULL, NULL); | 1190 | SLAB_HWCACHE_ALIGN|SLAB_PANIC, NULL); |
1191 | } | 1191 | } |
1192 | } | 1192 | } |
1193 | 1193 | ||
diff --git a/fs/block_dev.c b/fs/block_dev.c index 3635315e3b99..2980eabe5779 100644 --- a/fs/block_dev.c +++ b/fs/block_dev.c | |||
@@ -517,7 +517,7 @@ void __init bdev_cache_init(void) | |||
517 | bdev_cachep = kmem_cache_create("bdev_cache", sizeof(struct bdev_inode), | 517 | bdev_cachep = kmem_cache_create("bdev_cache", sizeof(struct bdev_inode), |
518 | 0, (SLAB_HWCACHE_ALIGN|SLAB_RECLAIM_ACCOUNT| | 518 | 0, (SLAB_HWCACHE_ALIGN|SLAB_RECLAIM_ACCOUNT| |
519 | SLAB_MEM_SPREAD|SLAB_PANIC), | 519 | SLAB_MEM_SPREAD|SLAB_PANIC), |
520 | init_once, NULL); | 520 | init_once); |
521 | err = register_filesystem(&bd_type); | 521 | err = register_filesystem(&bd_type); |
522 | if (err) | 522 | if (err) |
523 | panic("Cannot register bdev pseudo-fs"); | 523 | panic("Cannot register bdev pseudo-fs"); |
diff --git a/fs/cifs/cifsfs.c b/fs/cifs/cifsfs.c index 1fd0dc85f53c..cabb6a55d7dd 100644 --- a/fs/cifs/cifsfs.c +++ b/fs/cifs/cifsfs.c | |||
@@ -719,7 +719,7 @@ cifs_init_inodecache(void) | |||
719 | sizeof (struct cifsInodeInfo), | 719 | sizeof (struct cifsInodeInfo), |
720 | 0, (SLAB_RECLAIM_ACCOUNT| | 720 | 0, (SLAB_RECLAIM_ACCOUNT| |
721 | SLAB_MEM_SPREAD), | 721 | SLAB_MEM_SPREAD), |
722 | cifs_init_once, NULL); | 722 | cifs_init_once); |
723 | if (cifs_inode_cachep == NULL) | 723 | if (cifs_inode_cachep == NULL) |
724 | return -ENOMEM; | 724 | return -ENOMEM; |
725 | 725 | ||
@@ -748,7 +748,7 @@ cifs_init_request_bufs(void) | |||
748 | cifs_req_cachep = kmem_cache_create("cifs_request", | 748 | cifs_req_cachep = kmem_cache_create("cifs_request", |
749 | CIFSMaxBufSize + | 749 | CIFSMaxBufSize + |
750 | MAX_CIFS_HDR_SIZE, 0, | 750 | MAX_CIFS_HDR_SIZE, 0, |
751 | SLAB_HWCACHE_ALIGN, NULL, NULL); | 751 | SLAB_HWCACHE_ALIGN, NULL); |
752 | if (cifs_req_cachep == NULL) | 752 | if (cifs_req_cachep == NULL) |
753 | return -ENOMEM; | 753 | return -ENOMEM; |
754 | 754 | ||
@@ -776,7 +776,7 @@ cifs_init_request_bufs(void) | |||
776 | alloc of large cifs buffers even when page debugging is on */ | 776 | alloc of large cifs buffers even when page debugging is on */ |
777 | cifs_sm_req_cachep = kmem_cache_create("cifs_small_rq", | 777 | cifs_sm_req_cachep = kmem_cache_create("cifs_small_rq", |
778 | MAX_CIFS_SMALL_BUFFER_SIZE, 0, SLAB_HWCACHE_ALIGN, | 778 | MAX_CIFS_SMALL_BUFFER_SIZE, 0, SLAB_HWCACHE_ALIGN, |
779 | NULL, NULL); | 779 | NULL); |
780 | if (cifs_sm_req_cachep == NULL) { | 780 | if (cifs_sm_req_cachep == NULL) { |
781 | mempool_destroy(cifs_req_poolp); | 781 | mempool_destroy(cifs_req_poolp); |
782 | kmem_cache_destroy(cifs_req_cachep); | 782 | kmem_cache_destroy(cifs_req_cachep); |
@@ -817,7 +817,7 @@ cifs_init_mids(void) | |||
817 | { | 817 | { |
818 | cifs_mid_cachep = kmem_cache_create("cifs_mpx_ids", | 818 | cifs_mid_cachep = kmem_cache_create("cifs_mpx_ids", |
819 | sizeof (struct mid_q_entry), 0, | 819 | sizeof (struct mid_q_entry), 0, |
820 | SLAB_HWCACHE_ALIGN, NULL, NULL); | 820 | SLAB_HWCACHE_ALIGN, NULL); |
821 | if (cifs_mid_cachep == NULL) | 821 | if (cifs_mid_cachep == NULL) |
822 | return -ENOMEM; | 822 | return -ENOMEM; |
823 | 823 | ||
@@ -830,7 +830,7 @@ cifs_init_mids(void) | |||
830 | 830 | ||
831 | cifs_oplock_cachep = kmem_cache_create("cifs_oplock_structs", | 831 | cifs_oplock_cachep = kmem_cache_create("cifs_oplock_structs", |
832 | sizeof (struct oplock_q_entry), 0, | 832 | sizeof (struct oplock_q_entry), 0, |
833 | SLAB_HWCACHE_ALIGN, NULL, NULL); | 833 | SLAB_HWCACHE_ALIGN, NULL); |
834 | if (cifs_oplock_cachep == NULL) { | 834 | if (cifs_oplock_cachep == NULL) { |
835 | mempool_destroy(cifs_mid_poolp); | 835 | mempool_destroy(cifs_mid_poolp); |
836 | kmem_cache_destroy(cifs_mid_cachep); | 836 | kmem_cache_destroy(cifs_mid_cachep); |
diff --git a/fs/coda/inode.c b/fs/coda/inode.c index 6771a4271e33..342f4e0d582e 100644 --- a/fs/coda/inode.c +++ b/fs/coda/inode.c | |||
@@ -64,13 +64,13 @@ static void init_once(void * foo, struct kmem_cache * cachep, unsigned long flag | |||
64 | 64 | ||
65 | inode_init_once(&ei->vfs_inode); | 65 | inode_init_once(&ei->vfs_inode); |
66 | } | 66 | } |
67 | 67 | ||
68 | int coda_init_inodecache(void) | 68 | int coda_init_inodecache(void) |
69 | { | 69 | { |
70 | coda_inode_cachep = kmem_cache_create("coda_inode_cache", | 70 | coda_inode_cachep = kmem_cache_create("coda_inode_cache", |
71 | sizeof(struct coda_inode_info), | 71 | sizeof(struct coda_inode_info), |
72 | 0, SLAB_RECLAIM_ACCOUNT|SLAB_MEM_SPREAD, | 72 | 0, SLAB_RECLAIM_ACCOUNT|SLAB_MEM_SPREAD, |
73 | init_once, NULL); | 73 | init_once); |
74 | if (coda_inode_cachep == NULL) | 74 | if (coda_inode_cachep == NULL) |
75 | return -ENOMEM; | 75 | return -ENOMEM; |
76 | return 0; | 76 | return 0; |
diff --git a/fs/configfs/mount.c b/fs/configfs/mount.c index b00d962de833..871b0cb61839 100644 --- a/fs/configfs/mount.c +++ b/fs/configfs/mount.c | |||
@@ -136,7 +136,7 @@ static int __init configfs_init(void) | |||
136 | 136 | ||
137 | configfs_dir_cachep = kmem_cache_create("configfs_dir_cache", | 137 | configfs_dir_cachep = kmem_cache_create("configfs_dir_cache", |
138 | sizeof(struct configfs_dirent), | 138 | sizeof(struct configfs_dirent), |
139 | 0, 0, NULL, NULL); | 139 | 0, 0, NULL); |
140 | if (!configfs_dir_cachep) | 140 | if (!configfs_dir_cachep) |
141 | goto out; | 141 | goto out; |
142 | 142 | ||
diff --git a/fs/dcache.c b/fs/dcache.c index cb9d05056b54..678d39deb607 100644 --- a/fs/dcache.c +++ b/fs/dcache.c | |||
@@ -2165,10 +2165,10 @@ void __init vfs_caches_init(unsigned long mempages) | |||
2165 | mempages -= reserve; | 2165 | mempages -= reserve; |
2166 | 2166 | ||
2167 | names_cachep = kmem_cache_create("names_cache", PATH_MAX, 0, | 2167 | names_cachep = kmem_cache_create("names_cache", PATH_MAX, 0, |
2168 | SLAB_HWCACHE_ALIGN|SLAB_PANIC, NULL, NULL); | 2168 | SLAB_HWCACHE_ALIGN|SLAB_PANIC, NULL); |
2169 | 2169 | ||
2170 | filp_cachep = kmem_cache_create("filp", sizeof(struct file), 0, | 2170 | filp_cachep = kmem_cache_create("filp", sizeof(struct file), 0, |
2171 | SLAB_HWCACHE_ALIGN|SLAB_PANIC, NULL, NULL); | 2171 | SLAB_HWCACHE_ALIGN|SLAB_PANIC, NULL); |
2172 | 2172 | ||
2173 | dcache_init(mempages); | 2173 | dcache_init(mempages); |
2174 | inode_init(mempages); | 2174 | inode_init(mempages); |
diff --git a/fs/dcookies.c b/fs/dcookies.c index 21af1629f9bc..c1208f53bd74 100644 --- a/fs/dcookies.c +++ b/fs/dcookies.c | |||
@@ -205,7 +205,7 @@ static int dcookie_init(void) | |||
205 | 205 | ||
206 | dcookie_cache = kmem_cache_create("dcookie_cache", | 206 | dcookie_cache = kmem_cache_create("dcookie_cache", |
207 | sizeof(struct dcookie_struct), | 207 | sizeof(struct dcookie_struct), |
208 | 0, 0, NULL, NULL); | 208 | 0, 0, NULL); |
209 | 209 | ||
210 | if (!dcookie_cache) | 210 | if (!dcookie_cache) |
211 | goto out; | 211 | goto out; |
diff --git a/fs/dlm/lowcomms.c b/fs/dlm/lowcomms.c index 0553a6158dcb..dd362739d291 100644 --- a/fs/dlm/lowcomms.c +++ b/fs/dlm/lowcomms.c | |||
@@ -1449,7 +1449,7 @@ int dlm_lowcomms_start(void) | |||
1449 | error = -ENOMEM; | 1449 | error = -ENOMEM; |
1450 | con_cache = kmem_cache_create("dlm_conn", sizeof(struct connection), | 1450 | con_cache = kmem_cache_create("dlm_conn", sizeof(struct connection), |
1451 | __alignof__(struct connection), 0, | 1451 | __alignof__(struct connection), 0, |
1452 | NULL, NULL); | 1452 | NULL); |
1453 | if (!con_cache) | 1453 | if (!con_cache) |
1454 | goto out; | 1454 | goto out; |
1455 | 1455 | ||
diff --git a/fs/dlm/memory.c b/fs/dlm/memory.c index fb9e2ee998ae..ecf0e5cb2035 100644 --- a/fs/dlm/memory.c +++ b/fs/dlm/memory.c | |||
@@ -23,7 +23,7 @@ int dlm_memory_init(void) | |||
23 | int ret = 0; | 23 | int ret = 0; |
24 | 24 | ||
25 | lkb_cache = kmem_cache_create("dlm_lkb", sizeof(struct dlm_lkb), | 25 | lkb_cache = kmem_cache_create("dlm_lkb", sizeof(struct dlm_lkb), |
26 | __alignof__(struct dlm_lkb), 0, NULL, NULL); | 26 | __alignof__(struct dlm_lkb), 0, NULL); |
27 | if (!lkb_cache) | 27 | if (!lkb_cache) |
28 | ret = -ENOMEM; | 28 | ret = -ENOMEM; |
29 | return ret; | 29 | return ret; |
diff --git a/fs/dnotify.c b/fs/dnotify.c index 936409fcd939..28d01ed66de0 100644 --- a/fs/dnotify.c +++ b/fs/dnotify.c | |||
@@ -176,7 +176,7 @@ EXPORT_SYMBOL_GPL(dnotify_parent); | |||
176 | static int __init dnotify_init(void) | 176 | static int __init dnotify_init(void) |
177 | { | 177 | { |
178 | dn_cache = kmem_cache_create("dnotify_cache", | 178 | dn_cache = kmem_cache_create("dnotify_cache", |
179 | sizeof(struct dnotify_struct), 0, SLAB_PANIC, NULL, NULL); | 179 | sizeof(struct dnotify_struct), 0, SLAB_PANIC, NULL); |
180 | return 0; | 180 | return 0; |
181 | } | 181 | } |
182 | 182 | ||
diff --git a/fs/dquot.c b/fs/dquot.c index 7e273151f589..de9a29f64ff3 100644 --- a/fs/dquot.c +++ b/fs/dquot.c | |||
@@ -1848,11 +1848,11 @@ static int __init dquot_init(void) | |||
1848 | 1848 | ||
1849 | register_sysctl_table(sys_table); | 1849 | register_sysctl_table(sys_table); |
1850 | 1850 | ||
1851 | dquot_cachep = kmem_cache_create("dquot", | 1851 | dquot_cachep = kmem_cache_create("dquot", |
1852 | sizeof(struct dquot), sizeof(unsigned long) * 4, | 1852 | sizeof(struct dquot), sizeof(unsigned long) * 4, |
1853 | (SLAB_HWCACHE_ALIGN|SLAB_RECLAIM_ACCOUNT| | 1853 | (SLAB_HWCACHE_ALIGN|SLAB_RECLAIM_ACCOUNT| |
1854 | SLAB_MEM_SPREAD|SLAB_PANIC), | 1854 | SLAB_MEM_SPREAD|SLAB_PANIC), |
1855 | NULL, NULL); | 1855 | NULL); |
1856 | 1856 | ||
1857 | order = 0; | 1857 | order = 0; |
1858 | dquot_hash = (struct hlist_head *)__get_free_pages(GFP_ATOMIC, order); | 1858 | dquot_hash = (struct hlist_head *)__get_free_pages(GFP_ATOMIC, order); |
diff --git a/fs/ecryptfs/main.c b/fs/ecryptfs/main.c index 02ca6f1e55d7..e557a6766927 100644 --- a/fs/ecryptfs/main.c +++ b/fs/ecryptfs/main.c | |||
@@ -677,7 +677,7 @@ static int ecryptfs_init_kmem_caches(void) | |||
677 | 677 | ||
678 | info = &ecryptfs_cache_infos[i]; | 678 | info = &ecryptfs_cache_infos[i]; |
679 | *(info->cache) = kmem_cache_create(info->name, info->size, | 679 | *(info->cache) = kmem_cache_create(info->name, info->size, |
680 | 0, SLAB_HWCACHE_ALIGN, info->ctor, NULL); | 680 | 0, SLAB_HWCACHE_ALIGN, info->ctor); |
681 | if (!*(info->cache)) { | 681 | if (!*(info->cache)) { |
682 | ecryptfs_free_kmem_caches(); | 682 | ecryptfs_free_kmem_caches(); |
683 | ecryptfs_printk(KERN_WARNING, "%s: " | 683 | ecryptfs_printk(KERN_WARNING, "%s: " |
diff --git a/fs/efs/super.c b/fs/efs/super.c index d360c81f3a72..ce4acb8ff819 100644 --- a/fs/efs/super.c +++ b/fs/efs/super.c | |||
@@ -75,13 +75,13 @@ static void init_once(void * foo, struct kmem_cache * cachep, unsigned long flag | |||
75 | 75 | ||
76 | inode_init_once(&ei->vfs_inode); | 76 | inode_init_once(&ei->vfs_inode); |
77 | } | 77 | } |
78 | 78 | ||
79 | static int init_inodecache(void) | 79 | static int init_inodecache(void) |
80 | { | 80 | { |
81 | efs_inode_cachep = kmem_cache_create("efs_inode_cache", | 81 | efs_inode_cachep = kmem_cache_create("efs_inode_cache", |
82 | sizeof(struct efs_inode_info), | 82 | sizeof(struct efs_inode_info), |
83 | 0, SLAB_RECLAIM_ACCOUNT|SLAB_MEM_SPREAD, | 83 | 0, SLAB_RECLAIM_ACCOUNT|SLAB_MEM_SPREAD, |
84 | init_once, NULL); | 84 | init_once); |
85 | if (efs_inode_cachep == NULL) | 85 | if (efs_inode_cachep == NULL) |
86 | return -ENOMEM; | 86 | return -ENOMEM; |
87 | return 0; | 87 | return 0; |
diff --git a/fs/eventpoll.c b/fs/eventpoll.c index 0b73cd45a06d..77b9953624f4 100644 --- a/fs/eventpoll.c +++ b/fs/eventpoll.c | |||
@@ -1324,12 +1324,12 @@ static int __init eventpoll_init(void) | |||
1324 | /* Allocates slab cache used to allocate "struct epitem" items */ | 1324 | /* Allocates slab cache used to allocate "struct epitem" items */ |
1325 | epi_cache = kmem_cache_create("eventpoll_epi", sizeof(struct epitem), | 1325 | epi_cache = kmem_cache_create("eventpoll_epi", sizeof(struct epitem), |
1326 | 0, SLAB_HWCACHE_ALIGN|EPI_SLAB_DEBUG|SLAB_PANIC, | 1326 | 0, SLAB_HWCACHE_ALIGN|EPI_SLAB_DEBUG|SLAB_PANIC, |
1327 | NULL, NULL); | 1327 | NULL); |
1328 | 1328 | ||
1329 | /* Allocates slab cache used to allocate "struct eppoll_entry" */ | 1329 | /* Allocates slab cache used to allocate "struct eppoll_entry" */ |
1330 | pwq_cache = kmem_cache_create("eventpoll_pwq", | 1330 | pwq_cache = kmem_cache_create("eventpoll_pwq", |
1331 | sizeof(struct eppoll_entry), 0, | 1331 | sizeof(struct eppoll_entry), 0, |
1332 | EPI_SLAB_DEBUG|SLAB_PANIC, NULL, NULL); | 1332 | EPI_SLAB_DEBUG|SLAB_PANIC, NULL); |
1333 | 1333 | ||
1334 | return 0; | 1334 | return 0; |
1335 | } | 1335 | } |
diff --git a/fs/ext2/super.c b/fs/ext2/super.c index a6b1072daea7..68579a0ed3f0 100644 --- a/fs/ext2/super.c +++ b/fs/ext2/super.c | |||
@@ -167,14 +167,14 @@ static void init_once(void * foo, struct kmem_cache * cachep, unsigned long flag | |||
167 | #endif | 167 | #endif |
168 | inode_init_once(&ei->vfs_inode); | 168 | inode_init_once(&ei->vfs_inode); |
169 | } | 169 | } |
170 | 170 | ||
171 | static int init_inodecache(void) | 171 | static int init_inodecache(void) |
172 | { | 172 | { |
173 | ext2_inode_cachep = kmem_cache_create("ext2_inode_cache", | 173 | ext2_inode_cachep = kmem_cache_create("ext2_inode_cache", |
174 | sizeof(struct ext2_inode_info), | 174 | sizeof(struct ext2_inode_info), |
175 | 0, (SLAB_RECLAIM_ACCOUNT| | 175 | 0, (SLAB_RECLAIM_ACCOUNT| |
176 | SLAB_MEM_SPREAD), | 176 | SLAB_MEM_SPREAD), |
177 | init_once, NULL); | 177 | init_once); |
178 | if (ext2_inode_cachep == NULL) | 178 | if (ext2_inode_cachep == NULL) |
179 | return -ENOMEM; | 179 | return -ENOMEM; |
180 | return 0; | 180 | return 0; |
diff --git a/fs/ext3/super.c b/fs/ext3/super.c index 4f84dc86628a..f0614e3f1fe8 100644 --- a/fs/ext3/super.c +++ b/fs/ext3/super.c | |||
@@ -490,7 +490,7 @@ static int init_inodecache(void) | |||
490 | sizeof(struct ext3_inode_info), | 490 | sizeof(struct ext3_inode_info), |
491 | 0, (SLAB_RECLAIM_ACCOUNT| | 491 | 0, (SLAB_RECLAIM_ACCOUNT| |
492 | SLAB_MEM_SPREAD), | 492 | SLAB_MEM_SPREAD), |
493 | init_once, NULL); | 493 | init_once); |
494 | if (ext3_inode_cachep == NULL) | 494 | if (ext3_inode_cachep == NULL) |
495 | return -ENOMEM; | 495 | return -ENOMEM; |
496 | return 0; | 496 | return 0; |
diff --git a/fs/ext4/super.c b/fs/ext4/super.c index 6dcbb28dc06d..75adbb64e028 100644 --- a/fs/ext4/super.c +++ b/fs/ext4/super.c | |||
@@ -541,7 +541,7 @@ static int init_inodecache(void) | |||
541 | sizeof(struct ext4_inode_info), | 541 | sizeof(struct ext4_inode_info), |
542 | 0, (SLAB_RECLAIM_ACCOUNT| | 542 | 0, (SLAB_RECLAIM_ACCOUNT| |
543 | SLAB_MEM_SPREAD), | 543 | SLAB_MEM_SPREAD), |
544 | init_once, NULL); | 544 | init_once); |
545 | if (ext4_inode_cachep == NULL) | 545 | if (ext4_inode_cachep == NULL) |
546 | return -ENOMEM; | 546 | return -ENOMEM; |
547 | return 0; | 547 | return 0; |
diff --git a/fs/fat/cache.c b/fs/fat/cache.c index 3c9c8a15ec73..be6f89b152ca 100644 --- a/fs/fat/cache.c +++ b/fs/fat/cache.c | |||
@@ -48,7 +48,7 @@ int __init fat_cache_init(void) | |||
48 | fat_cache_cachep = kmem_cache_create("fat_cache", | 48 | fat_cache_cachep = kmem_cache_create("fat_cache", |
49 | sizeof(struct fat_cache), | 49 | sizeof(struct fat_cache), |
50 | 0, SLAB_RECLAIM_ACCOUNT|SLAB_MEM_SPREAD, | 50 | 0, SLAB_RECLAIM_ACCOUNT|SLAB_MEM_SPREAD, |
51 | init_once, NULL); | 51 | init_once); |
52 | if (fat_cache_cachep == NULL) | 52 | if (fat_cache_cachep == NULL) |
53 | return -ENOMEM; | 53 | return -ENOMEM; |
54 | return 0; | 54 | return 0; |
diff --git a/fs/fat/inode.c b/fs/fat/inode.c index 0a7ddb39a593..4baa5f205368 100644 --- a/fs/fat/inode.c +++ b/fs/fat/inode.c | |||
@@ -514,7 +514,7 @@ static int __init fat_init_inodecache(void) | |||
514 | sizeof(struct msdos_inode_info), | 514 | sizeof(struct msdos_inode_info), |
515 | 0, (SLAB_RECLAIM_ACCOUNT| | 515 | 0, (SLAB_RECLAIM_ACCOUNT| |
516 | SLAB_MEM_SPREAD), | 516 | SLAB_MEM_SPREAD), |
517 | init_once, NULL); | 517 | init_once); |
518 | if (fat_inode_cachep == NULL) | 518 | if (fat_inode_cachep == NULL) |
519 | return -ENOMEM; | 519 | return -ENOMEM; |
520 | return 0; | 520 | return 0; |
diff --git a/fs/fcntl.c b/fs/fcntl.c index 3f22e9f4f691..78b2ff044054 100644 --- a/fs/fcntl.c +++ b/fs/fcntl.c | |||
@@ -638,7 +638,7 @@ EXPORT_SYMBOL(kill_fasync); | |||
638 | static int __init fasync_init(void) | 638 | static int __init fasync_init(void) |
639 | { | 639 | { |
640 | fasync_cache = kmem_cache_create("fasync_cache", | 640 | fasync_cache = kmem_cache_create("fasync_cache", |
641 | sizeof(struct fasync_struct), 0, SLAB_PANIC, NULL, NULL); | 641 | sizeof(struct fasync_struct), 0, SLAB_PANIC, NULL); |
642 | return 0; | 642 | return 0; |
643 | } | 643 | } |
644 | 644 | ||
diff --git a/fs/freevxfs/vxfs_super.c b/fs/freevxfs/vxfs_super.c index 647d600f0bc8..4f95572d2722 100644 --- a/fs/freevxfs/vxfs_super.c +++ b/fs/freevxfs/vxfs_super.c | |||
@@ -263,8 +263,8 @@ vxfs_init(void) | |||
263 | int rv; | 263 | int rv; |
264 | 264 | ||
265 | vxfs_inode_cachep = kmem_cache_create("vxfs_inode", | 265 | vxfs_inode_cachep = kmem_cache_create("vxfs_inode", |
266 | sizeof(struct vxfs_inode_info), 0, | 266 | sizeof(struct vxfs_inode_info), 0, |
267 | SLAB_RECLAIM_ACCOUNT|SLAB_MEM_SPREAD, NULL, NULL); | 267 | SLAB_RECLAIM_ACCOUNT|SLAB_MEM_SPREAD, NULL); |
268 | if (!vxfs_inode_cachep) | 268 | if (!vxfs_inode_cachep) |
269 | return -ENOMEM; | 269 | return -ENOMEM; |
270 | rv = register_filesystem(&vxfs_fs_type); | 270 | rv = register_filesystem(&vxfs_fs_type); |
diff --git a/fs/fuse/dev.c b/fs/fuse/dev.c index 357764d85ff1..3ad22beb24c2 100644 --- a/fs/fuse/dev.c +++ b/fs/fuse/dev.c | |||
@@ -1044,7 +1044,7 @@ int __init fuse_dev_init(void) | |||
1044 | int err = -ENOMEM; | 1044 | int err = -ENOMEM; |
1045 | fuse_req_cachep = kmem_cache_create("fuse_request", | 1045 | fuse_req_cachep = kmem_cache_create("fuse_request", |
1046 | sizeof(struct fuse_req), | 1046 | sizeof(struct fuse_req), |
1047 | 0, 0, NULL, NULL); | 1047 | 0, 0, NULL); |
1048 | if (!fuse_req_cachep) | 1048 | if (!fuse_req_cachep) |
1049 | goto out; | 1049 | goto out; |
1050 | 1050 | ||
diff --git a/fs/fuse/inode.c b/fs/fuse/inode.c index cc5efc13496a..5448f625ab56 100644 --- a/fs/fuse/inode.c +++ b/fs/fuse/inode.c | |||
@@ -706,7 +706,7 @@ static int __init fuse_fs_init(void) | |||
706 | fuse_inode_cachep = kmem_cache_create("fuse_inode", | 706 | fuse_inode_cachep = kmem_cache_create("fuse_inode", |
707 | sizeof(struct fuse_inode), | 707 | sizeof(struct fuse_inode), |
708 | 0, SLAB_HWCACHE_ALIGN, | 708 | 0, SLAB_HWCACHE_ALIGN, |
709 | fuse_inode_init_once, NULL); | 709 | fuse_inode_init_once); |
710 | err = -ENOMEM; | 710 | err = -ENOMEM; |
711 | if (!fuse_inode_cachep) | 711 | if (!fuse_inode_cachep) |
712 | goto out_unreg2; | 712 | goto out_unreg2; |
diff --git a/fs/gfs2/main.c b/fs/gfs2/main.c index 787a0edef100..d5d4e68b8807 100644 --- a/fs/gfs2/main.c +++ b/fs/gfs2/main.c | |||
@@ -72,7 +72,7 @@ static int __init init_gfs2_fs(void) | |||
72 | gfs2_glock_cachep = kmem_cache_create("gfs2_glock", | 72 | gfs2_glock_cachep = kmem_cache_create("gfs2_glock", |
73 | sizeof(struct gfs2_glock), | 73 | sizeof(struct gfs2_glock), |
74 | 0, 0, | 74 | 0, 0, |
75 | gfs2_init_glock_once, NULL); | 75 | gfs2_init_glock_once); |
76 | if (!gfs2_glock_cachep) | 76 | if (!gfs2_glock_cachep) |
77 | goto fail; | 77 | goto fail; |
78 | 78 | ||
@@ -80,13 +80,13 @@ static int __init init_gfs2_fs(void) | |||
80 | sizeof(struct gfs2_inode), | 80 | sizeof(struct gfs2_inode), |
81 | 0, SLAB_RECLAIM_ACCOUNT| | 81 | 0, SLAB_RECLAIM_ACCOUNT| |
82 | SLAB_MEM_SPREAD, | 82 | SLAB_MEM_SPREAD, |
83 | gfs2_init_inode_once, NULL); | 83 | gfs2_init_inode_once); |
84 | if (!gfs2_inode_cachep) | 84 | if (!gfs2_inode_cachep) |
85 | goto fail; | 85 | goto fail; |
86 | 86 | ||
87 | gfs2_bufdata_cachep = kmem_cache_create("gfs2_bufdata", | 87 | gfs2_bufdata_cachep = kmem_cache_create("gfs2_bufdata", |
88 | sizeof(struct gfs2_bufdata), | 88 | sizeof(struct gfs2_bufdata), |
89 | 0, 0, NULL, NULL); | 89 | 0, 0, NULL); |
90 | if (!gfs2_bufdata_cachep) | 90 | if (!gfs2_bufdata_cachep) |
91 | goto fail; | 91 | goto fail; |
92 | 92 | ||
diff --git a/fs/hfs/super.c b/fs/hfs/super.c index 92cf8751e428..6c5f92dfb500 100644 --- a/fs/hfs/super.c +++ b/fs/hfs/super.c | |||
@@ -443,7 +443,7 @@ static int __init init_hfs_fs(void) | |||
443 | 443 | ||
444 | hfs_inode_cachep = kmem_cache_create("hfs_inode_cache", | 444 | hfs_inode_cachep = kmem_cache_create("hfs_inode_cache", |
445 | sizeof(struct hfs_inode_info), 0, SLAB_HWCACHE_ALIGN, | 445 | sizeof(struct hfs_inode_info), 0, SLAB_HWCACHE_ALIGN, |
446 | hfs_init_once, NULL); | 446 | hfs_init_once); |
447 | if (!hfs_inode_cachep) | 447 | if (!hfs_inode_cachep) |
448 | return -ENOMEM; | 448 | return -ENOMEM; |
449 | err = register_filesystem(&hfs_fs_type); | 449 | err = register_filesystem(&hfs_fs_type); |
diff --git a/fs/hfsplus/super.c b/fs/hfsplus/super.c index 6d87a2a9534d..7b0f2e5a44e2 100644 --- a/fs/hfsplus/super.c +++ b/fs/hfsplus/super.c | |||
@@ -479,7 +479,7 @@ static int __init init_hfsplus_fs(void) | |||
479 | 479 | ||
480 | hfsplus_inode_cachep = kmem_cache_create("hfsplus_icache", | 480 | hfsplus_inode_cachep = kmem_cache_create("hfsplus_icache", |
481 | HFSPLUS_INODE_SIZE, 0, SLAB_HWCACHE_ALIGN, | 481 | HFSPLUS_INODE_SIZE, 0, SLAB_HWCACHE_ALIGN, |
482 | hfsplus_init_once, NULL); | 482 | hfsplus_init_once); |
483 | if (!hfsplus_inode_cachep) | 483 | if (!hfsplus_inode_cachep) |
484 | return -ENOMEM; | 484 | return -ENOMEM; |
485 | err = register_filesystem(&hfsplus_fs_type); | 485 | err = register_filesystem(&hfsplus_fs_type); |
diff --git a/fs/hpfs/super.c b/fs/hpfs/super.c index 29cc34abb2ea..89612ee7c80d 100644 --- a/fs/hpfs/super.c +++ b/fs/hpfs/super.c | |||
@@ -181,14 +181,14 @@ static void init_once(void * foo, struct kmem_cache * cachep, unsigned long flag | |||
181 | mutex_init(&ei->i_parent_mutex); | 181 | mutex_init(&ei->i_parent_mutex); |
182 | inode_init_once(&ei->vfs_inode); | 182 | inode_init_once(&ei->vfs_inode); |
183 | } | 183 | } |
184 | 184 | ||
185 | static int init_inodecache(void) | 185 | static int init_inodecache(void) |
186 | { | 186 | { |
187 | hpfs_inode_cachep = kmem_cache_create("hpfs_inode_cache", | 187 | hpfs_inode_cachep = kmem_cache_create("hpfs_inode_cache", |
188 | sizeof(struct hpfs_inode_info), | 188 | sizeof(struct hpfs_inode_info), |
189 | 0, (SLAB_RECLAIM_ACCOUNT| | 189 | 0, (SLAB_RECLAIM_ACCOUNT| |
190 | SLAB_MEM_SPREAD), | 190 | SLAB_MEM_SPREAD), |
191 | init_once, NULL); | 191 | init_once); |
192 | if (hpfs_inode_cachep == NULL) | 192 | if (hpfs_inode_cachep == NULL) |
193 | return -ENOMEM; | 193 | return -ENOMEM; |
194 | return 0; | 194 | return 0; |
diff --git a/fs/hugetlbfs/inode.c b/fs/hugetlbfs/inode.c index d145cb79c30a..c848a191525d 100644 --- a/fs/hugetlbfs/inode.c +++ b/fs/hugetlbfs/inode.c | |||
@@ -848,7 +848,7 @@ static int __init init_hugetlbfs_fs(void) | |||
848 | 848 | ||
849 | hugetlbfs_inode_cachep = kmem_cache_create("hugetlbfs_inode_cache", | 849 | hugetlbfs_inode_cachep = kmem_cache_create("hugetlbfs_inode_cache", |
850 | sizeof(struct hugetlbfs_inode_info), | 850 | sizeof(struct hugetlbfs_inode_info), |
851 | 0, 0, init_once, NULL); | 851 | 0, 0, init_once); |
852 | if (hugetlbfs_inode_cachep == NULL) | 852 | if (hugetlbfs_inode_cachep == NULL) |
853 | return -ENOMEM; | 853 | return -ENOMEM; |
854 | 854 | ||
diff --git a/fs/inode.c b/fs/inode.c index 320e088d0b28..29f5068f819b 100644 --- a/fs/inode.c +++ b/fs/inode.c | |||
@@ -1388,8 +1388,7 @@ void __init inode_init(unsigned long mempages) | |||
1388 | 0, | 1388 | 0, |
1389 | (SLAB_RECLAIM_ACCOUNT|SLAB_PANIC| | 1389 | (SLAB_RECLAIM_ACCOUNT|SLAB_PANIC| |
1390 | SLAB_MEM_SPREAD), | 1390 | SLAB_MEM_SPREAD), |
1391 | init_once, | 1391 | init_once); |
1392 | NULL); | ||
1393 | register_shrinker(&icache_shrinker); | 1392 | register_shrinker(&icache_shrinker); |
1394 | 1393 | ||
1395 | /* Hash may have been set up in inode_init_early */ | 1394 | /* Hash may have been set up in inode_init_early */ |
diff --git a/fs/inotify_user.c b/fs/inotify_user.c index 9f2224f65a18..9bf2f6c09df6 100644 --- a/fs/inotify_user.c +++ b/fs/inotify_user.c | |||
@@ -716,10 +716,10 @@ static int __init inotify_user_setup(void) | |||
716 | 716 | ||
717 | watch_cachep = kmem_cache_create("inotify_watch_cache", | 717 | watch_cachep = kmem_cache_create("inotify_watch_cache", |
718 | sizeof(struct inotify_user_watch), | 718 | sizeof(struct inotify_user_watch), |
719 | 0, SLAB_PANIC, NULL, NULL); | 719 | 0, SLAB_PANIC, NULL); |
720 | event_cachep = kmem_cache_create("inotify_event_cache", | 720 | event_cachep = kmem_cache_create("inotify_event_cache", |
721 | sizeof(struct inotify_kernel_event), | 721 | sizeof(struct inotify_kernel_event), |
722 | 0, SLAB_PANIC, NULL, NULL); | 722 | 0, SLAB_PANIC, NULL); |
723 | 723 | ||
724 | return 0; | 724 | return 0; |
725 | } | 725 | } |
diff --git a/fs/isofs/inode.c b/fs/isofs/inode.c index 4f5418be0590..95c72aa81867 100644 --- a/fs/isofs/inode.c +++ b/fs/isofs/inode.c | |||
@@ -86,7 +86,7 @@ static int init_inodecache(void) | |||
86 | sizeof(struct iso_inode_info), | 86 | sizeof(struct iso_inode_info), |
87 | 0, (SLAB_RECLAIM_ACCOUNT| | 87 | 0, (SLAB_RECLAIM_ACCOUNT| |
88 | SLAB_MEM_SPREAD), | 88 | SLAB_MEM_SPREAD), |
89 | init_once, NULL); | 89 | init_once); |
90 | if (isofs_inode_cachep == NULL) | 90 | if (isofs_inode_cachep == NULL) |
91 | return -ENOMEM; | 91 | return -ENOMEM; |
92 | return 0; | 92 | return 0; |
diff --git a/fs/jbd/journal.c b/fs/jbd/journal.c index 46fe7439fb91..06ab3c10b1b8 100644 --- a/fs/jbd/journal.c +++ b/fs/jbd/journal.c | |||
@@ -1668,7 +1668,7 @@ static int journal_create_jbd_slab(size_t slab_size) | |||
1668 | * boundary. | 1668 | * boundary. |
1669 | */ | 1669 | */ |
1670 | jbd_slab[i] = kmem_cache_create(jbd_slab_names[i], | 1670 | jbd_slab[i] = kmem_cache_create(jbd_slab_names[i], |
1671 | slab_size, slab_size, 0, NULL, NULL); | 1671 | slab_size, slab_size, 0, NULL); |
1672 | if (!jbd_slab[i]) { | 1672 | if (!jbd_slab[i]) { |
1673 | printk(KERN_EMERG "JBD: no memory for jbd_slab cache\n"); | 1673 | printk(KERN_EMERG "JBD: no memory for jbd_slab cache\n"); |
1674 | return -ENOMEM; | 1674 | return -ENOMEM; |
@@ -1711,8 +1711,7 @@ static int journal_init_journal_head_cache(void) | |||
1711 | sizeof(struct journal_head), | 1711 | sizeof(struct journal_head), |
1712 | 0, /* offset */ | 1712 | 0, /* offset */ |
1713 | 0, /* flags */ | 1713 | 0, /* flags */ |
1714 | NULL, /* ctor */ | 1714 | NULL); /* ctor */ |
1715 | NULL); /* dtor */ | ||
1716 | retval = 0; | 1715 | retval = 0; |
1717 | if (journal_head_cache == 0) { | 1716 | if (journal_head_cache == 0) { |
1718 | retval = -ENOMEM; | 1717 | retval = -ENOMEM; |
@@ -2008,8 +2007,7 @@ static int __init journal_init_handle_cache(void) | |||
2008 | sizeof(handle_t), | 2007 | sizeof(handle_t), |
2009 | 0, /* offset */ | 2008 | 0, /* offset */ |
2010 | 0, /* flags */ | 2009 | 0, /* flags */ |
2011 | NULL, /* ctor */ | 2010 | NULL); /* ctor */ |
2012 | NULL); /* dtor */ | ||
2013 | if (jbd_handle_cache == NULL) { | 2011 | if (jbd_handle_cache == NULL) { |
2014 | printk(KERN_EMERG "JBD: failed to create handle cache\n"); | 2012 | printk(KERN_EMERG "JBD: failed to create handle cache\n"); |
2015 | return -ENOMEM; | 2013 | return -ENOMEM; |
diff --git a/fs/jbd/revoke.c b/fs/jbd/revoke.c index 8db2fa25170b..62e13c8db132 100644 --- a/fs/jbd/revoke.c +++ b/fs/jbd/revoke.c | |||
@@ -170,13 +170,13 @@ int __init journal_init_revoke_caches(void) | |||
170 | { | 170 | { |
171 | revoke_record_cache = kmem_cache_create("revoke_record", | 171 | revoke_record_cache = kmem_cache_create("revoke_record", |
172 | sizeof(struct jbd_revoke_record_s), | 172 | sizeof(struct jbd_revoke_record_s), |
173 | 0, SLAB_HWCACHE_ALIGN, NULL, NULL); | 173 | 0, SLAB_HWCACHE_ALIGN, NULL); |
174 | if (revoke_record_cache == 0) | 174 | if (revoke_record_cache == 0) |
175 | return -ENOMEM; | 175 | return -ENOMEM; |
176 | 176 | ||
177 | revoke_table_cache = kmem_cache_create("revoke_table", | 177 | revoke_table_cache = kmem_cache_create("revoke_table", |
178 | sizeof(struct jbd_revoke_table_s), | 178 | sizeof(struct jbd_revoke_table_s), |
179 | 0, 0, NULL, NULL); | 179 | 0, 0, NULL); |
180 | if (revoke_table_cache == 0) { | 180 | if (revoke_table_cache == 0) { |
181 | kmem_cache_destroy(revoke_record_cache); | 181 | kmem_cache_destroy(revoke_record_cache); |
182 | revoke_record_cache = NULL; | 182 | revoke_record_cache = NULL; |
diff --git a/fs/jbd2/journal.c b/fs/jbd2/journal.c index f290cb7cb834..f37324aee817 100644 --- a/fs/jbd2/journal.c +++ b/fs/jbd2/journal.c | |||
@@ -1680,7 +1680,7 @@ static int jbd2_journal_create_jbd_slab(size_t slab_size) | |||
1680 | * boundary. | 1680 | * boundary. |
1681 | */ | 1681 | */ |
1682 | jbd_slab[i] = kmem_cache_create(jbd_slab_names[i], | 1682 | jbd_slab[i] = kmem_cache_create(jbd_slab_names[i], |
1683 | slab_size, slab_size, 0, NULL, NULL); | 1683 | slab_size, slab_size, 0, NULL); |
1684 | if (!jbd_slab[i]) { | 1684 | if (!jbd_slab[i]) { |
1685 | printk(KERN_EMERG "JBD: no memory for jbd_slab cache\n"); | 1685 | printk(KERN_EMERG "JBD: no memory for jbd_slab cache\n"); |
1686 | return -ENOMEM; | 1686 | return -ENOMEM; |
@@ -1723,8 +1723,7 @@ static int journal_init_jbd2_journal_head_cache(void) | |||
1723 | sizeof(struct journal_head), | 1723 | sizeof(struct journal_head), |
1724 | 0, /* offset */ | 1724 | 0, /* offset */ |
1725 | 0, /* flags */ | 1725 | 0, /* flags */ |
1726 | NULL, /* ctor */ | 1726 | NULL); /* ctor */ |
1727 | NULL); /* dtor */ | ||
1728 | retval = 0; | 1727 | retval = 0; |
1729 | if (jbd2_journal_head_cache == 0) { | 1728 | if (jbd2_journal_head_cache == 0) { |
1730 | retval = -ENOMEM; | 1729 | retval = -ENOMEM; |
@@ -2006,8 +2005,7 @@ static int __init journal_init_handle_cache(void) | |||
2006 | sizeof(handle_t), | 2005 | sizeof(handle_t), |
2007 | 0, /* offset */ | 2006 | 0, /* offset */ |
2008 | 0, /* flags */ | 2007 | 0, /* flags */ |
2009 | NULL, /* ctor */ | 2008 | NULL); /* ctor */ |
2010 | NULL); /* dtor */ | ||
2011 | if (jbd2_handle_cache == NULL) { | 2009 | if (jbd2_handle_cache == NULL) { |
2012 | printk(KERN_EMERG "JBD: failed to create handle cache\n"); | 2010 | printk(KERN_EMERG "JBD: failed to create handle cache\n"); |
2013 | return -ENOMEM; | 2011 | return -ENOMEM; |
diff --git a/fs/jbd2/revoke.c b/fs/jbd2/revoke.c index 28cac049a56b..01d88975e0c5 100644 --- a/fs/jbd2/revoke.c +++ b/fs/jbd2/revoke.c | |||
@@ -171,13 +171,13 @@ int __init jbd2_journal_init_revoke_caches(void) | |||
171 | { | 171 | { |
172 | jbd2_revoke_record_cache = kmem_cache_create("jbd2_revoke_record", | 172 | jbd2_revoke_record_cache = kmem_cache_create("jbd2_revoke_record", |
173 | sizeof(struct jbd2_revoke_record_s), | 173 | sizeof(struct jbd2_revoke_record_s), |
174 | 0, SLAB_HWCACHE_ALIGN, NULL, NULL); | 174 | 0, SLAB_HWCACHE_ALIGN, NULL); |
175 | if (jbd2_revoke_record_cache == 0) | 175 | if (jbd2_revoke_record_cache == 0) |
176 | return -ENOMEM; | 176 | return -ENOMEM; |
177 | 177 | ||
178 | jbd2_revoke_table_cache = kmem_cache_create("jbd2_revoke_table", | 178 | jbd2_revoke_table_cache = kmem_cache_create("jbd2_revoke_table", |
179 | sizeof(struct jbd2_revoke_table_s), | 179 | sizeof(struct jbd2_revoke_table_s), |
180 | 0, 0, NULL, NULL); | 180 | 0, 0, NULL); |
181 | if (jbd2_revoke_table_cache == 0) { | 181 | if (jbd2_revoke_table_cache == 0) { |
182 | kmem_cache_destroy(jbd2_revoke_record_cache); | 182 | kmem_cache_destroy(jbd2_revoke_record_cache); |
183 | jbd2_revoke_record_cache = NULL; | 183 | jbd2_revoke_record_cache = NULL; |
diff --git a/fs/jffs2/malloc.c b/fs/jffs2/malloc.c index 35c1a5e30ba1..f9211252b5f1 100644 --- a/fs/jffs2/malloc.c +++ b/fs/jffs2/malloc.c | |||
@@ -33,56 +33,56 @@ int __init jffs2_create_slab_caches(void) | |||
33 | { | 33 | { |
34 | full_dnode_slab = kmem_cache_create("jffs2_full_dnode", | 34 | full_dnode_slab = kmem_cache_create("jffs2_full_dnode", |
35 | sizeof(struct jffs2_full_dnode), | 35 | sizeof(struct jffs2_full_dnode), |
36 | 0, 0, NULL, NULL); | 36 | 0, 0, NULL); |
37 | if (!full_dnode_slab) | 37 | if (!full_dnode_slab) |
38 | goto err; | 38 | goto err; |
39 | 39 | ||
40 | raw_dirent_slab = kmem_cache_create("jffs2_raw_dirent", | 40 | raw_dirent_slab = kmem_cache_create("jffs2_raw_dirent", |
41 | sizeof(struct jffs2_raw_dirent), | 41 | sizeof(struct jffs2_raw_dirent), |
42 | 0, 0, NULL, NULL); | 42 | 0, 0, NULL); |
43 | if (!raw_dirent_slab) | 43 | if (!raw_dirent_slab) |
44 | goto err; | 44 | goto err; |
45 | 45 | ||
46 | raw_inode_slab = kmem_cache_create("jffs2_raw_inode", | 46 | raw_inode_slab = kmem_cache_create("jffs2_raw_inode", |
47 | sizeof(struct jffs2_raw_inode), | 47 | sizeof(struct jffs2_raw_inode), |
48 | 0, 0, NULL, NULL); | 48 | 0, 0, NULL); |
49 | if (!raw_inode_slab) | 49 | if (!raw_inode_slab) |
50 | goto err; | 50 | goto err; |
51 | 51 | ||
52 | tmp_dnode_info_slab = kmem_cache_create("jffs2_tmp_dnode", | 52 | tmp_dnode_info_slab = kmem_cache_create("jffs2_tmp_dnode", |
53 | sizeof(struct jffs2_tmp_dnode_info), | 53 | sizeof(struct jffs2_tmp_dnode_info), |
54 | 0, 0, NULL, NULL); | 54 | 0, 0, NULL); |
55 | if (!tmp_dnode_info_slab) | 55 | if (!tmp_dnode_info_slab) |
56 | goto err; | 56 | goto err; |
57 | 57 | ||
58 | raw_node_ref_slab = kmem_cache_create("jffs2_refblock", | 58 | raw_node_ref_slab = kmem_cache_create("jffs2_refblock", |
59 | sizeof(struct jffs2_raw_node_ref) * (REFS_PER_BLOCK + 1), | 59 | sizeof(struct jffs2_raw_node_ref) * (REFS_PER_BLOCK + 1), |
60 | 0, 0, NULL, NULL); | 60 | 0, 0, NULL); |
61 | if (!raw_node_ref_slab) | 61 | if (!raw_node_ref_slab) |
62 | goto err; | 62 | goto err; |
63 | 63 | ||
64 | node_frag_slab = kmem_cache_create("jffs2_node_frag", | 64 | node_frag_slab = kmem_cache_create("jffs2_node_frag", |
65 | sizeof(struct jffs2_node_frag), | 65 | sizeof(struct jffs2_node_frag), |
66 | 0, 0, NULL, NULL); | 66 | 0, 0, NULL); |
67 | if (!node_frag_slab) | 67 | if (!node_frag_slab) |
68 | goto err; | 68 | goto err; |
69 | 69 | ||
70 | inode_cache_slab = kmem_cache_create("jffs2_inode_cache", | 70 | inode_cache_slab = kmem_cache_create("jffs2_inode_cache", |
71 | sizeof(struct jffs2_inode_cache), | 71 | sizeof(struct jffs2_inode_cache), |
72 | 0, 0, NULL, NULL); | 72 | 0, 0, NULL); |
73 | if (!inode_cache_slab) | 73 | if (!inode_cache_slab) |
74 | goto err; | 74 | goto err; |
75 | 75 | ||
76 | #ifdef CONFIG_JFFS2_FS_XATTR | 76 | #ifdef CONFIG_JFFS2_FS_XATTR |
77 | xattr_datum_cache = kmem_cache_create("jffs2_xattr_datum", | 77 | xattr_datum_cache = kmem_cache_create("jffs2_xattr_datum", |
78 | sizeof(struct jffs2_xattr_datum), | 78 | sizeof(struct jffs2_xattr_datum), |
79 | 0, 0, NULL, NULL); | 79 | 0, 0, NULL); |
80 | if (!xattr_datum_cache) | 80 | if (!xattr_datum_cache) |
81 | goto err; | 81 | goto err; |
82 | 82 | ||
83 | xattr_ref_cache = kmem_cache_create("jffs2_xattr_ref", | 83 | xattr_ref_cache = kmem_cache_create("jffs2_xattr_ref", |
84 | sizeof(struct jffs2_xattr_ref), | 84 | sizeof(struct jffs2_xattr_ref), |
85 | 0, 0, NULL, NULL); | 85 | 0, 0, NULL); |
86 | if (!xattr_ref_cache) | 86 | if (!xattr_ref_cache) |
87 | goto err; | 87 | goto err; |
88 | #endif | 88 | #endif |
diff --git a/fs/jffs2/super.c b/fs/jffs2/super.c index e220d3bd610d..be2b70c2ec16 100644 --- a/fs/jffs2/super.c +++ b/fs/jffs2/super.c | |||
@@ -192,7 +192,7 @@ static int __init init_jffs2_fs(void) | |||
192 | sizeof(struct jffs2_inode_info), | 192 | sizeof(struct jffs2_inode_info), |
193 | 0, (SLAB_RECLAIM_ACCOUNT| | 193 | 0, (SLAB_RECLAIM_ACCOUNT| |
194 | SLAB_MEM_SPREAD), | 194 | SLAB_MEM_SPREAD), |
195 | jffs2_i_init_once, NULL); | 195 | jffs2_i_init_once); |
196 | if (!jffs2_inode_cachep) { | 196 | if (!jffs2_inode_cachep) { |
197 | printk(KERN_ERR "JFFS2 error: Failed to initialise inode cache\n"); | 197 | printk(KERN_ERR "JFFS2 error: Failed to initialise inode cache\n"); |
198 | return -ENOMEM; | 198 | return -ENOMEM; |
diff --git a/fs/jfs/jfs_metapage.c b/fs/jfs/jfs_metapage.c index 77c7f1129dde..62e96be02acf 100644 --- a/fs/jfs/jfs_metapage.c +++ b/fs/jfs/jfs_metapage.c | |||
@@ -213,7 +213,7 @@ int __init metapage_init(void) | |||
213 | * Allocate the metapage structures | 213 | * Allocate the metapage structures |
214 | */ | 214 | */ |
215 | metapage_cache = kmem_cache_create("jfs_mp", sizeof(struct metapage), | 215 | metapage_cache = kmem_cache_create("jfs_mp", sizeof(struct metapage), |
216 | 0, 0, init_once, NULL); | 216 | 0, 0, init_once); |
217 | if (metapage_cache == NULL) | 217 | if (metapage_cache == NULL) |
218 | return -ENOMEM; | 218 | return -ENOMEM; |
219 | 219 | ||
diff --git a/fs/jfs/super.c b/fs/jfs/super.c index 929fceca7999..4b372f550652 100644 --- a/fs/jfs/super.c +++ b/fs/jfs/super.c | |||
@@ -776,7 +776,7 @@ static int __init init_jfs_fs(void) | |||
776 | jfs_inode_cachep = | 776 | jfs_inode_cachep = |
777 | kmem_cache_create("jfs_ip", sizeof(struct jfs_inode_info), 0, | 777 | kmem_cache_create("jfs_ip", sizeof(struct jfs_inode_info), 0, |
778 | SLAB_RECLAIM_ACCOUNT|SLAB_MEM_SPREAD, | 778 | SLAB_RECLAIM_ACCOUNT|SLAB_MEM_SPREAD, |
779 | init_once, NULL); | 779 | init_once); |
780 | if (jfs_inode_cachep == NULL) | 780 | if (jfs_inode_cachep == NULL) |
781 | return -ENOMEM; | 781 | return -ENOMEM; |
782 | 782 | ||
diff --git a/fs/locks.c b/fs/locks.c index 4f2d749ac624..310510637247 100644 --- a/fs/locks.c +++ b/fs/locks.c | |||
@@ -2276,7 +2276,7 @@ static int __init filelock_init(void) | |||
2276 | { | 2276 | { |
2277 | filelock_cache = kmem_cache_create("file_lock_cache", | 2277 | filelock_cache = kmem_cache_create("file_lock_cache", |
2278 | sizeof(struct file_lock), 0, SLAB_PANIC, | 2278 | sizeof(struct file_lock), 0, SLAB_PANIC, |
2279 | init_once, NULL); | 2279 | init_once); |
2280 | return 0; | 2280 | return 0; |
2281 | } | 2281 | } |
2282 | 2282 | ||
diff --git a/fs/mbcache.c b/fs/mbcache.c index fbb1d02f8791..1046cbefbfbf 100644 --- a/fs/mbcache.c +++ b/fs/mbcache.c | |||
@@ -292,7 +292,7 @@ mb_cache_create(const char *name, struct mb_cache_op *cache_op, | |||
292 | INIT_LIST_HEAD(&cache->c_indexes_hash[m][n]); | 292 | INIT_LIST_HEAD(&cache->c_indexes_hash[m][n]); |
293 | } | 293 | } |
294 | cache->c_entry_cache = kmem_cache_create(name, entry_size, 0, | 294 | cache->c_entry_cache = kmem_cache_create(name, entry_size, 0, |
295 | SLAB_RECLAIM_ACCOUNT|SLAB_MEM_SPREAD, NULL, NULL); | 295 | SLAB_RECLAIM_ACCOUNT|SLAB_MEM_SPREAD, NULL); |
296 | if (!cache->c_entry_cache) | 296 | if (!cache->c_entry_cache) |
297 | goto fail; | 297 | goto fail; |
298 | 298 | ||
diff --git a/fs/minix/inode.c b/fs/minix/inode.c index be4044614ac8..43668d7d668f 100644 --- a/fs/minix/inode.c +++ b/fs/minix/inode.c | |||
@@ -75,14 +75,14 @@ static void init_once(void * foo, struct kmem_cache * cachep, unsigned long flag | |||
75 | 75 | ||
76 | inode_init_once(&ei->vfs_inode); | 76 | inode_init_once(&ei->vfs_inode); |
77 | } | 77 | } |
78 | 78 | ||
79 | static int init_inodecache(void) | 79 | static int init_inodecache(void) |
80 | { | 80 | { |
81 | minix_inode_cachep = kmem_cache_create("minix_inode_cache", | 81 | minix_inode_cachep = kmem_cache_create("minix_inode_cache", |
82 | sizeof(struct minix_inode_info), | 82 | sizeof(struct minix_inode_info), |
83 | 0, (SLAB_RECLAIM_ACCOUNT| | 83 | 0, (SLAB_RECLAIM_ACCOUNT| |
84 | SLAB_MEM_SPREAD), | 84 | SLAB_MEM_SPREAD), |
85 | init_once, NULL); | 85 | init_once); |
86 | if (minix_inode_cachep == NULL) | 86 | if (minix_inode_cachep == NULL) |
87 | return -ENOMEM; | 87 | return -ENOMEM; |
88 | return 0; | 88 | return 0; |
diff --git a/fs/namespace.c b/fs/namespace.c index 4198003d7e18..ddbda13c2d31 100644 --- a/fs/namespace.c +++ b/fs/namespace.c | |||
@@ -1801,7 +1801,7 @@ void __init mnt_init(unsigned long mempages) | |||
1801 | init_rwsem(&namespace_sem); | 1801 | init_rwsem(&namespace_sem); |
1802 | 1802 | ||
1803 | mnt_cache = kmem_cache_create("mnt_cache", sizeof(struct vfsmount), | 1803 | mnt_cache = kmem_cache_create("mnt_cache", sizeof(struct vfsmount), |
1804 | 0, SLAB_HWCACHE_ALIGN | SLAB_PANIC, NULL, NULL); | 1804 | 0, SLAB_HWCACHE_ALIGN | SLAB_PANIC, NULL); |
1805 | 1805 | ||
1806 | mount_hashtable = (struct list_head *)__get_free_page(GFP_ATOMIC); | 1806 | mount_hashtable = (struct list_head *)__get_free_page(GFP_ATOMIC); |
1807 | 1807 | ||
diff --git a/fs/ncpfs/inode.c b/fs/ncpfs/inode.c index cf06eb9f050e..7f8536dbdedc 100644 --- a/fs/ncpfs/inode.c +++ b/fs/ncpfs/inode.c | |||
@@ -63,14 +63,14 @@ static void init_once(void * foo, struct kmem_cache * cachep, unsigned long flag | |||
63 | mutex_init(&ei->open_mutex); | 63 | mutex_init(&ei->open_mutex); |
64 | inode_init_once(&ei->vfs_inode); | 64 | inode_init_once(&ei->vfs_inode); |
65 | } | 65 | } |
66 | 66 | ||
67 | static int init_inodecache(void) | 67 | static int init_inodecache(void) |
68 | { | 68 | { |
69 | ncp_inode_cachep = kmem_cache_create("ncp_inode_cache", | 69 | ncp_inode_cachep = kmem_cache_create("ncp_inode_cache", |
70 | sizeof(struct ncp_inode_info), | 70 | sizeof(struct ncp_inode_info), |
71 | 0, (SLAB_RECLAIM_ACCOUNT| | 71 | 0, (SLAB_RECLAIM_ACCOUNT| |
72 | SLAB_MEM_SPREAD), | 72 | SLAB_MEM_SPREAD), |
73 | init_once, NULL); | 73 | init_once); |
74 | if (ncp_inode_cachep == NULL) | 74 | if (ncp_inode_cachep == NULL) |
75 | return -ENOMEM; | 75 | return -ENOMEM; |
76 | return 0; | 76 | return 0; |
diff --git a/fs/nfs/direct.c b/fs/nfs/direct.c index a5c82b6f3b45..fcf4d384610e 100644 --- a/fs/nfs/direct.c +++ b/fs/nfs/direct.c | |||
@@ -875,7 +875,7 @@ int __init nfs_init_directcache(void) | |||
875 | sizeof(struct nfs_direct_req), | 875 | sizeof(struct nfs_direct_req), |
876 | 0, (SLAB_RECLAIM_ACCOUNT| | 876 | 0, (SLAB_RECLAIM_ACCOUNT| |
877 | SLAB_MEM_SPREAD), | 877 | SLAB_MEM_SPREAD), |
878 | NULL, NULL); | 878 | NULL); |
879 | if (nfs_direct_cachep == NULL) | 879 | if (nfs_direct_cachep == NULL) |
880 | return -ENOMEM; | 880 | return -ENOMEM; |
881 | 881 | ||
diff --git a/fs/nfs/inode.c b/fs/nfs/inode.c index 3d9fccf4ef93..bca6cdcb9f0d 100644 --- a/fs/nfs/inode.c +++ b/fs/nfs/inode.c | |||
@@ -1165,14 +1165,14 @@ static void init_once(void * foo, struct kmem_cache * cachep, unsigned long flag | |||
1165 | nfsi->npages = 0; | 1165 | nfsi->npages = 0; |
1166 | nfs4_init_once(nfsi); | 1166 | nfs4_init_once(nfsi); |
1167 | } | 1167 | } |
1168 | 1168 | ||
1169 | static int __init nfs_init_inodecache(void) | 1169 | static int __init nfs_init_inodecache(void) |
1170 | { | 1170 | { |
1171 | nfs_inode_cachep = kmem_cache_create("nfs_inode_cache", | 1171 | nfs_inode_cachep = kmem_cache_create("nfs_inode_cache", |
1172 | sizeof(struct nfs_inode), | 1172 | sizeof(struct nfs_inode), |
1173 | 0, (SLAB_RECLAIM_ACCOUNT| | 1173 | 0, (SLAB_RECLAIM_ACCOUNT| |
1174 | SLAB_MEM_SPREAD), | 1174 | SLAB_MEM_SPREAD), |
1175 | init_once, NULL); | 1175 | init_once); |
1176 | if (nfs_inode_cachep == NULL) | 1176 | if (nfs_inode_cachep == NULL) |
1177 | return -ENOMEM; | 1177 | return -ENOMEM; |
1178 | 1178 | ||
diff --git a/fs/nfs/pagelist.c b/fs/nfs/pagelist.c index f56dae5216f4..345bb9b4765b 100644 --- a/fs/nfs/pagelist.c +++ b/fs/nfs/pagelist.c | |||
@@ -442,7 +442,7 @@ int __init nfs_init_nfspagecache(void) | |||
442 | nfs_page_cachep = kmem_cache_create("nfs_page", | 442 | nfs_page_cachep = kmem_cache_create("nfs_page", |
443 | sizeof(struct nfs_page), | 443 | sizeof(struct nfs_page), |
444 | 0, SLAB_HWCACHE_ALIGN, | 444 | 0, SLAB_HWCACHE_ALIGN, |
445 | NULL, NULL); | 445 | NULL); |
446 | if (nfs_page_cachep == NULL) | 446 | if (nfs_page_cachep == NULL) |
447 | return -ENOMEM; | 447 | return -ENOMEM; |
448 | 448 | ||
diff --git a/fs/nfs/read.c b/fs/nfs/read.c index 6ae2e58ed05a..19e05633f4e3 100644 --- a/fs/nfs/read.c +++ b/fs/nfs/read.c | |||
@@ -598,7 +598,7 @@ int __init nfs_init_readpagecache(void) | |||
598 | nfs_rdata_cachep = kmem_cache_create("nfs_read_data", | 598 | nfs_rdata_cachep = kmem_cache_create("nfs_read_data", |
599 | sizeof(struct nfs_read_data), | 599 | sizeof(struct nfs_read_data), |
600 | 0, SLAB_HWCACHE_ALIGN, | 600 | 0, SLAB_HWCACHE_ALIGN, |
601 | NULL, NULL); | 601 | NULL); |
602 | if (nfs_rdata_cachep == NULL) | 602 | if (nfs_rdata_cachep == NULL) |
603 | return -ENOMEM; | 603 | return -ENOMEM; |
604 | 604 | ||
diff --git a/fs/nfs/write.c b/fs/nfs/write.c index 73ac992ece85..ef97e0c0f5b1 100644 --- a/fs/nfs/write.c +++ b/fs/nfs/write.c | |||
@@ -1467,7 +1467,7 @@ int __init nfs_init_writepagecache(void) | |||
1467 | nfs_wdata_cachep = kmem_cache_create("nfs_write_data", | 1467 | nfs_wdata_cachep = kmem_cache_create("nfs_write_data", |
1468 | sizeof(struct nfs_write_data), | 1468 | sizeof(struct nfs_write_data), |
1469 | 0, SLAB_HWCACHE_ALIGN, | 1469 | 0, SLAB_HWCACHE_ALIGN, |
1470 | NULL, NULL); | 1470 | NULL); |
1471 | if (nfs_wdata_cachep == NULL) | 1471 | if (nfs_wdata_cachep == NULL) |
1472 | return -ENOMEM; | 1472 | return -ENOMEM; |
1473 | 1473 | ||
diff --git a/fs/nfsd/nfs4state.c b/fs/nfsd/nfs4state.c index 6284807bd37e..3f559700788f 100644 --- a/fs/nfsd/nfs4state.c +++ b/fs/nfsd/nfs4state.c | |||
@@ -1032,19 +1032,19 @@ static int | |||
1032 | nfsd4_init_slabs(void) | 1032 | nfsd4_init_slabs(void) |
1033 | { | 1033 | { |
1034 | stateowner_slab = kmem_cache_create("nfsd4_stateowners", | 1034 | stateowner_slab = kmem_cache_create("nfsd4_stateowners", |
1035 | sizeof(struct nfs4_stateowner), 0, 0, NULL, NULL); | 1035 | sizeof(struct nfs4_stateowner), 0, 0, NULL); |
1036 | if (stateowner_slab == NULL) | 1036 | if (stateowner_slab == NULL) |
1037 | goto out_nomem; | 1037 | goto out_nomem; |
1038 | file_slab = kmem_cache_create("nfsd4_files", | 1038 | file_slab = kmem_cache_create("nfsd4_files", |
1039 | sizeof(struct nfs4_file), 0, 0, NULL, NULL); | 1039 | sizeof(struct nfs4_file), 0, 0, NULL); |
1040 | if (file_slab == NULL) | 1040 | if (file_slab == NULL) |
1041 | goto out_nomem; | 1041 | goto out_nomem; |
1042 | stateid_slab = kmem_cache_create("nfsd4_stateids", | 1042 | stateid_slab = kmem_cache_create("nfsd4_stateids", |
1043 | sizeof(struct nfs4_stateid), 0, 0, NULL, NULL); | 1043 | sizeof(struct nfs4_stateid), 0, 0, NULL); |
1044 | if (stateid_slab == NULL) | 1044 | if (stateid_slab == NULL) |
1045 | goto out_nomem; | 1045 | goto out_nomem; |
1046 | deleg_slab = kmem_cache_create("nfsd4_delegations", | 1046 | deleg_slab = kmem_cache_create("nfsd4_delegations", |
1047 | sizeof(struct nfs4_delegation), 0, 0, NULL, NULL); | 1047 | sizeof(struct nfs4_delegation), 0, 0, NULL); |
1048 | if (deleg_slab == NULL) | 1048 | if (deleg_slab == NULL) |
1049 | goto out_nomem; | 1049 | goto out_nomem; |
1050 | return 0; | 1050 | return 0; |
diff --git a/fs/ntfs/super.c b/fs/ntfs/super.c index 4566b9182551..90c4e3a29706 100644 --- a/fs/ntfs/super.c +++ b/fs/ntfs/super.c | |||
@@ -3143,7 +3143,7 @@ static int __init init_ntfs_fs(void) | |||
3143 | 3143 | ||
3144 | ntfs_index_ctx_cache = kmem_cache_create(ntfs_index_ctx_cache_name, | 3144 | ntfs_index_ctx_cache = kmem_cache_create(ntfs_index_ctx_cache_name, |
3145 | sizeof(ntfs_index_context), 0 /* offset */, | 3145 | sizeof(ntfs_index_context), 0 /* offset */, |
3146 | SLAB_HWCACHE_ALIGN, NULL /* ctor */, NULL /* dtor */); | 3146 | SLAB_HWCACHE_ALIGN, NULL /* ctor */); |
3147 | if (!ntfs_index_ctx_cache) { | 3147 | if (!ntfs_index_ctx_cache) { |
3148 | printk(KERN_CRIT "NTFS: Failed to create %s!\n", | 3148 | printk(KERN_CRIT "NTFS: Failed to create %s!\n", |
3149 | ntfs_index_ctx_cache_name); | 3149 | ntfs_index_ctx_cache_name); |
@@ -3151,7 +3151,7 @@ static int __init init_ntfs_fs(void) | |||
3151 | } | 3151 | } |
3152 | ntfs_attr_ctx_cache = kmem_cache_create(ntfs_attr_ctx_cache_name, | 3152 | ntfs_attr_ctx_cache = kmem_cache_create(ntfs_attr_ctx_cache_name, |
3153 | sizeof(ntfs_attr_search_ctx), 0 /* offset */, | 3153 | sizeof(ntfs_attr_search_ctx), 0 /* offset */, |
3154 | SLAB_HWCACHE_ALIGN, NULL /* ctor */, NULL /* dtor */); | 3154 | SLAB_HWCACHE_ALIGN, NULL /* ctor */); |
3155 | if (!ntfs_attr_ctx_cache) { | 3155 | if (!ntfs_attr_ctx_cache) { |
3156 | printk(KERN_CRIT "NTFS: Failed to create %s!\n", | 3156 | printk(KERN_CRIT "NTFS: Failed to create %s!\n", |
3157 | ntfs_attr_ctx_cache_name); | 3157 | ntfs_attr_ctx_cache_name); |
@@ -3160,7 +3160,7 @@ static int __init init_ntfs_fs(void) | |||
3160 | 3160 | ||
3161 | ntfs_name_cache = kmem_cache_create(ntfs_name_cache_name, | 3161 | ntfs_name_cache = kmem_cache_create(ntfs_name_cache_name, |
3162 | (NTFS_MAX_NAME_LEN+1) * sizeof(ntfschar), 0, | 3162 | (NTFS_MAX_NAME_LEN+1) * sizeof(ntfschar), 0, |
3163 | SLAB_HWCACHE_ALIGN, NULL, NULL); | 3163 | SLAB_HWCACHE_ALIGN, NULL); |
3164 | if (!ntfs_name_cache) { | 3164 | if (!ntfs_name_cache) { |
3165 | printk(KERN_CRIT "NTFS: Failed to create %s!\n", | 3165 | printk(KERN_CRIT "NTFS: Failed to create %s!\n", |
3166 | ntfs_name_cache_name); | 3166 | ntfs_name_cache_name); |
@@ -3169,7 +3169,7 @@ static int __init init_ntfs_fs(void) | |||
3169 | 3169 | ||
3170 | ntfs_inode_cache = kmem_cache_create(ntfs_inode_cache_name, | 3170 | ntfs_inode_cache = kmem_cache_create(ntfs_inode_cache_name, |
3171 | sizeof(ntfs_inode), 0, | 3171 | sizeof(ntfs_inode), 0, |
3172 | SLAB_RECLAIM_ACCOUNT|SLAB_MEM_SPREAD, NULL, NULL); | 3172 | SLAB_RECLAIM_ACCOUNT|SLAB_MEM_SPREAD, NULL); |
3173 | if (!ntfs_inode_cache) { | 3173 | if (!ntfs_inode_cache) { |
3174 | printk(KERN_CRIT "NTFS: Failed to create %s!\n", | 3174 | printk(KERN_CRIT "NTFS: Failed to create %s!\n", |
3175 | ntfs_inode_cache_name); | 3175 | ntfs_inode_cache_name); |
@@ -3179,7 +3179,7 @@ static int __init init_ntfs_fs(void) | |||
3179 | ntfs_big_inode_cache = kmem_cache_create(ntfs_big_inode_cache_name, | 3179 | ntfs_big_inode_cache = kmem_cache_create(ntfs_big_inode_cache_name, |
3180 | sizeof(big_ntfs_inode), 0, | 3180 | sizeof(big_ntfs_inode), 0, |
3181 | SLAB_HWCACHE_ALIGN|SLAB_RECLAIM_ACCOUNT|SLAB_MEM_SPREAD, | 3181 | SLAB_HWCACHE_ALIGN|SLAB_RECLAIM_ACCOUNT|SLAB_MEM_SPREAD, |
3182 | ntfs_big_inode_init_once, NULL); | 3182 | ntfs_big_inode_init_once); |
3183 | if (!ntfs_big_inode_cache) { | 3183 | if (!ntfs_big_inode_cache) { |
3184 | printk(KERN_CRIT "NTFS: Failed to create %s!\n", | 3184 | printk(KERN_CRIT "NTFS: Failed to create %s!\n", |
3185 | ntfs_big_inode_cache_name); | 3185 | ntfs_big_inode_cache_name); |
diff --git a/fs/ocfs2/dlm/dlmfs.c b/fs/ocfs2/dlm/dlmfs.c index fd8cb1badc9b..7418dc83de1c 100644 --- a/fs/ocfs2/dlm/dlmfs.c +++ b/fs/ocfs2/dlm/dlmfs.c | |||
@@ -592,7 +592,7 @@ static int __init init_dlmfs_fs(void) | |||
592 | sizeof(struct dlmfs_inode_private), | 592 | sizeof(struct dlmfs_inode_private), |
593 | 0, (SLAB_HWCACHE_ALIGN|SLAB_RECLAIM_ACCOUNT| | 593 | 0, (SLAB_HWCACHE_ALIGN|SLAB_RECLAIM_ACCOUNT| |
594 | SLAB_MEM_SPREAD), | 594 | SLAB_MEM_SPREAD), |
595 | dlmfs_init_once, NULL); | 595 | dlmfs_init_once); |
596 | if (!dlmfs_inode_cache) | 596 | if (!dlmfs_inode_cache) |
597 | return -ENOMEM; | 597 | return -ENOMEM; |
598 | cleanup_inode = 1; | 598 | cleanup_inode = 1; |
diff --git a/fs/ocfs2/dlm/dlmmaster.c b/fs/ocfs2/dlm/dlmmaster.c index 65b2b9b92688..62e4a7daa286 100644 --- a/fs/ocfs2/dlm/dlmmaster.c +++ b/fs/ocfs2/dlm/dlmmaster.c | |||
@@ -510,7 +510,7 @@ int dlm_init_mle_cache(void) | |||
510 | dlm_mle_cache = kmem_cache_create("dlm_mle_cache", | 510 | dlm_mle_cache = kmem_cache_create("dlm_mle_cache", |
511 | sizeof(struct dlm_master_list_entry), | 511 | sizeof(struct dlm_master_list_entry), |
512 | 0, SLAB_HWCACHE_ALIGN, | 512 | 0, SLAB_HWCACHE_ALIGN, |
513 | NULL, NULL); | 513 | NULL); |
514 | if (dlm_mle_cache == NULL) | 514 | if (dlm_mle_cache == NULL) |
515 | return -ENOMEM; | 515 | return -ENOMEM; |
516 | return 0; | 516 | return 0; |
diff --git a/fs/ocfs2/super.c b/fs/ocfs2/super.c index 3a5a1ed09ac9..200c7d4790dc 100644 --- a/fs/ocfs2/super.c +++ b/fs/ocfs2/super.c | |||
@@ -984,7 +984,7 @@ static int ocfs2_initialize_mem_caches(void) | |||
984 | 0, | 984 | 0, |
985 | (SLAB_HWCACHE_ALIGN|SLAB_RECLAIM_ACCOUNT| | 985 | (SLAB_HWCACHE_ALIGN|SLAB_RECLAIM_ACCOUNT| |
986 | SLAB_MEM_SPREAD), | 986 | SLAB_MEM_SPREAD), |
987 | ocfs2_inode_init_once, NULL); | 987 | ocfs2_inode_init_once); |
988 | if (!ocfs2_inode_cachep) | 988 | if (!ocfs2_inode_cachep) |
989 | return -ENOMEM; | 989 | return -ENOMEM; |
990 | 990 | ||
diff --git a/fs/ocfs2/uptodate.c b/fs/ocfs2/uptodate.c index 39814b900fc0..4da8851f2b23 100644 --- a/fs/ocfs2/uptodate.c +++ b/fs/ocfs2/uptodate.c | |||
@@ -548,7 +548,7 @@ int __init init_ocfs2_uptodate_cache(void) | |||
548 | { | 548 | { |
549 | ocfs2_uptodate_cachep = kmem_cache_create("ocfs2_uptodate", | 549 | ocfs2_uptodate_cachep = kmem_cache_create("ocfs2_uptodate", |
550 | sizeof(struct ocfs2_meta_cache_item), | 550 | sizeof(struct ocfs2_meta_cache_item), |
551 | 0, SLAB_HWCACHE_ALIGN, NULL, NULL); | 551 | 0, SLAB_HWCACHE_ALIGN, NULL); |
552 | if (!ocfs2_uptodate_cachep) | 552 | if (!ocfs2_uptodate_cachep) |
553 | return -ENOMEM; | 553 | return -ENOMEM; |
554 | 554 | ||
diff --git a/fs/openpromfs/inode.c b/fs/openpromfs/inode.c index e62397341c36..dd86be2aa6c9 100644 --- a/fs/openpromfs/inode.c +++ b/fs/openpromfs/inode.c | |||
@@ -431,7 +431,7 @@ static int __init init_openprom_fs(void) | |||
431 | 0, | 431 | 0, |
432 | (SLAB_RECLAIM_ACCOUNT | | 432 | (SLAB_RECLAIM_ACCOUNT | |
433 | SLAB_MEM_SPREAD), | 433 | SLAB_MEM_SPREAD), |
434 | op_inode_init_once, NULL); | 434 | op_inode_init_once); |
435 | if (!op_inode_cachep) | 435 | if (!op_inode_cachep) |
436 | return -ENOMEM; | 436 | return -ENOMEM; |
437 | 437 | ||
diff --git a/fs/proc/inode.c b/fs/proc/inode.c index dd28e86ab422..94e2c1adf184 100644 --- a/fs/proc/inode.c +++ b/fs/proc/inode.c | |||
@@ -112,14 +112,14 @@ static void init_once(void * foo, struct kmem_cache * cachep, unsigned long flag | |||
112 | 112 | ||
113 | inode_init_once(&ei->vfs_inode); | 113 | inode_init_once(&ei->vfs_inode); |
114 | } | 114 | } |
115 | 115 | ||
116 | int __init proc_init_inodecache(void) | 116 | int __init proc_init_inodecache(void) |
117 | { | 117 | { |
118 | proc_inode_cachep = kmem_cache_create("proc_inode_cache", | 118 | proc_inode_cachep = kmem_cache_create("proc_inode_cache", |
119 | sizeof(struct proc_inode), | 119 | sizeof(struct proc_inode), |
120 | 0, (SLAB_RECLAIM_ACCOUNT| | 120 | 0, (SLAB_RECLAIM_ACCOUNT| |
121 | SLAB_MEM_SPREAD), | 121 | SLAB_MEM_SPREAD), |
122 | init_once, NULL); | 122 | init_once); |
123 | if (proc_inode_cachep == NULL) | 123 | if (proc_inode_cachep == NULL) |
124 | return -ENOMEM; | 124 | return -ENOMEM; |
125 | return 0; | 125 | return 0; |
diff --git a/fs/qnx4/inode.c b/fs/qnx4/inode.c index 8d256eb11813..1bc8d873a9e1 100644 --- a/fs/qnx4/inode.c +++ b/fs/qnx4/inode.c | |||
@@ -545,7 +545,7 @@ static int init_inodecache(void) | |||
545 | sizeof(struct qnx4_inode_info), | 545 | sizeof(struct qnx4_inode_info), |
546 | 0, (SLAB_RECLAIM_ACCOUNT| | 546 | 0, (SLAB_RECLAIM_ACCOUNT| |
547 | SLAB_MEM_SPREAD), | 547 | SLAB_MEM_SPREAD), |
548 | init_once, NULL); | 548 | init_once); |
549 | if (qnx4_inode_cachep == NULL) | 549 | if (qnx4_inode_cachep == NULL) |
550 | return -ENOMEM; | 550 | return -ENOMEM; |
551 | return 0; | 551 | return 0; |
diff --git a/fs/reiserfs/super.c b/fs/reiserfs/super.c index 5a93cfe1a032..5b68dd3f191a 100644 --- a/fs/reiserfs/super.c +++ b/fs/reiserfs/super.c | |||
@@ -527,7 +527,7 @@ static int init_inodecache(void) | |||
527 | reiserfs_inode_info), | 527 | reiserfs_inode_info), |
528 | 0, (SLAB_RECLAIM_ACCOUNT| | 528 | 0, (SLAB_RECLAIM_ACCOUNT| |
529 | SLAB_MEM_SPREAD), | 529 | SLAB_MEM_SPREAD), |
530 | init_once, NULL); | 530 | init_once); |
531 | if (reiserfs_inode_cachep == NULL) | 531 | if (reiserfs_inode_cachep == NULL) |
532 | return -ENOMEM; | 532 | return -ENOMEM; |
533 | return 0; | 533 | return 0; |
diff --git a/fs/romfs/inode.c b/fs/romfs/inode.c index 2284e03342c6..dae7945f90e4 100644 --- a/fs/romfs/inode.c +++ b/fs/romfs/inode.c | |||
@@ -572,14 +572,14 @@ static void init_once(void *foo, struct kmem_cache *cachep, unsigned long flags) | |||
572 | 572 | ||
573 | inode_init_once(&ei->vfs_inode); | 573 | inode_init_once(&ei->vfs_inode); |
574 | } | 574 | } |
575 | 575 | ||
576 | static int init_inodecache(void) | 576 | static int init_inodecache(void) |
577 | { | 577 | { |
578 | romfs_inode_cachep = kmem_cache_create("romfs_inode_cache", | 578 | romfs_inode_cachep = kmem_cache_create("romfs_inode_cache", |
579 | sizeof(struct romfs_inode_info), | 579 | sizeof(struct romfs_inode_info), |
580 | 0, (SLAB_RECLAIM_ACCOUNT| | 580 | 0, (SLAB_RECLAIM_ACCOUNT| |
581 | SLAB_MEM_SPREAD), | 581 | SLAB_MEM_SPREAD), |
582 | init_once, NULL); | 582 | init_once); |
583 | if (romfs_inode_cachep == NULL) | 583 | if (romfs_inode_cachep == NULL) |
584 | return -ENOMEM; | 584 | return -ENOMEM; |
585 | return 0; | 585 | return 0; |
diff --git a/fs/smbfs/inode.c b/fs/smbfs/inode.c index 6724a6cf01ff..73d1450a95d4 100644 --- a/fs/smbfs/inode.c +++ b/fs/smbfs/inode.c | |||
@@ -73,14 +73,14 @@ static void init_once(void * foo, struct kmem_cache * cachep, unsigned long flag | |||
73 | 73 | ||
74 | inode_init_once(&ei->vfs_inode); | 74 | inode_init_once(&ei->vfs_inode); |
75 | } | 75 | } |
76 | 76 | ||
77 | static int init_inodecache(void) | 77 | static int init_inodecache(void) |
78 | { | 78 | { |
79 | smb_inode_cachep = kmem_cache_create("smb_inode_cache", | 79 | smb_inode_cachep = kmem_cache_create("smb_inode_cache", |
80 | sizeof(struct smb_inode_info), | 80 | sizeof(struct smb_inode_info), |
81 | 0, (SLAB_RECLAIM_ACCOUNT| | 81 | 0, (SLAB_RECLAIM_ACCOUNT| |
82 | SLAB_MEM_SPREAD), | 82 | SLAB_MEM_SPREAD), |
83 | init_once, NULL); | 83 | init_once); |
84 | if (smb_inode_cachep == NULL) | 84 | if (smb_inode_cachep == NULL) |
85 | return -ENOMEM; | 85 | return -ENOMEM; |
86 | return 0; | 86 | return 0; |
diff --git a/fs/smbfs/request.c b/fs/smbfs/request.c index 3f54a0f80fae..ca4b2d59c0ca 100644 --- a/fs/smbfs/request.c +++ b/fs/smbfs/request.c | |||
@@ -40,7 +40,7 @@ int smb_init_request_cache(void) | |||
40 | req_cachep = kmem_cache_create("smb_request", | 40 | req_cachep = kmem_cache_create("smb_request", |
41 | sizeof(struct smb_request), 0, | 41 | sizeof(struct smb_request), 0, |
42 | SMB_SLAB_DEBUG | SLAB_HWCACHE_ALIGN, | 42 | SMB_SLAB_DEBUG | SLAB_HWCACHE_ALIGN, |
43 | NULL, NULL); | 43 | NULL); |
44 | if (req_cachep == NULL) | 44 | if (req_cachep == NULL) |
45 | return -ENOMEM; | 45 | return -ENOMEM; |
46 | 46 | ||
diff --git a/fs/sysfs/mount.c b/fs/sysfs/mount.c index 60714d075c2f..fbc7b65fe262 100644 --- a/fs/sysfs/mount.c +++ b/fs/sysfs/mount.c | |||
@@ -86,7 +86,7 @@ int __init sysfs_init(void) | |||
86 | 86 | ||
87 | sysfs_dir_cachep = kmem_cache_create("sysfs_dir_cache", | 87 | sysfs_dir_cachep = kmem_cache_create("sysfs_dir_cache", |
88 | sizeof(struct sysfs_dirent), | 88 | sizeof(struct sysfs_dirent), |
89 | 0, 0, NULL, NULL); | 89 | 0, 0, NULL); |
90 | if (!sysfs_dir_cachep) | 90 | if (!sysfs_dir_cachep) |
91 | goto out; | 91 | goto out; |
92 | 92 | ||
diff --git a/fs/sysv/inode.c b/fs/sysv/inode.c index 564411693394..7c4e5d302abb 100644 --- a/fs/sysv/inode.c +++ b/fs/sysv/inode.c | |||
@@ -342,7 +342,7 @@ int __init sysv_init_icache(void) | |||
342 | sysv_inode_cachep = kmem_cache_create("sysv_inode_cache", | 342 | sysv_inode_cachep = kmem_cache_create("sysv_inode_cache", |
343 | sizeof(struct sysv_inode_info), 0, | 343 | sizeof(struct sysv_inode_info), 0, |
344 | SLAB_RECLAIM_ACCOUNT|SLAB_MEM_SPREAD, | 344 | SLAB_RECLAIM_ACCOUNT|SLAB_MEM_SPREAD, |
345 | init_once, NULL); | 345 | init_once); |
346 | if (!sysv_inode_cachep) | 346 | if (!sysv_inode_cachep) |
347 | return -ENOMEM; | 347 | return -ENOMEM; |
348 | return 0; | 348 | return 0; |
diff --git a/fs/udf/super.c b/fs/udf/super.c index 911387aa1810..72097ee6b752 100644 --- a/fs/udf/super.c +++ b/fs/udf/super.c | |||
@@ -149,7 +149,7 @@ static int init_inodecache(void) | |||
149 | sizeof(struct udf_inode_info), | 149 | sizeof(struct udf_inode_info), |
150 | 0, (SLAB_RECLAIM_ACCOUNT | | 150 | 0, (SLAB_RECLAIM_ACCOUNT | |
151 | SLAB_MEM_SPREAD), | 151 | SLAB_MEM_SPREAD), |
152 | init_once, NULL); | 152 | init_once); |
153 | if (udf_inode_cachep == NULL) | 153 | if (udf_inode_cachep == NULL) |
154 | return -ENOMEM; | 154 | return -ENOMEM; |
155 | return 0; | 155 | return 0; |
diff --git a/fs/ufs/super.c b/fs/ufs/super.c index 2b3011689e89..73402c5eeb8a 100644 --- a/fs/ufs/super.c +++ b/fs/ufs/super.c | |||
@@ -1240,14 +1240,14 @@ static void init_once(void * foo, struct kmem_cache * cachep, unsigned long flag | |||
1240 | 1240 | ||
1241 | inode_init_once(&ei->vfs_inode); | 1241 | inode_init_once(&ei->vfs_inode); |
1242 | } | 1242 | } |
1243 | 1243 | ||
1244 | static int init_inodecache(void) | 1244 | static int init_inodecache(void) |
1245 | { | 1245 | { |
1246 | ufs_inode_cachep = kmem_cache_create("ufs_inode_cache", | 1246 | ufs_inode_cachep = kmem_cache_create("ufs_inode_cache", |
1247 | sizeof(struct ufs_inode_info), | 1247 | sizeof(struct ufs_inode_info), |
1248 | 0, (SLAB_RECLAIM_ACCOUNT| | 1248 | 0, (SLAB_RECLAIM_ACCOUNT| |
1249 | SLAB_MEM_SPREAD), | 1249 | SLAB_MEM_SPREAD), |
1250 | init_once, NULL); | 1250 | init_once); |
1251 | if (ufs_inode_cachep == NULL) | 1251 | if (ufs_inode_cachep == NULL) |
1252 | return -ENOMEM; | 1252 | return -ENOMEM; |
1253 | return 0; | 1253 | return 0; |
diff --git a/fs/xfs/linux-2.6/kmem.h b/fs/xfs/linux-2.6/kmem.h index 4b6470cf87f0..b4acc7f3c374 100644 --- a/fs/xfs/linux-2.6/kmem.h +++ b/fs/xfs/linux-2.6/kmem.h | |||
@@ -74,14 +74,14 @@ extern void kmem_free(void *, size_t); | |||
74 | static inline kmem_zone_t * | 74 | static inline kmem_zone_t * |
75 | kmem_zone_init(int size, char *zone_name) | 75 | kmem_zone_init(int size, char *zone_name) |
76 | { | 76 | { |
77 | return kmem_cache_create(zone_name, size, 0, 0, NULL, NULL); | 77 | return kmem_cache_create(zone_name, size, 0, 0, NULL); |
78 | } | 78 | } |
79 | 79 | ||
80 | static inline kmem_zone_t * | 80 | static inline kmem_zone_t * |
81 | kmem_zone_init_flags(int size, char *zone_name, unsigned long flags, | 81 | kmem_zone_init_flags(int size, char *zone_name, unsigned long flags, |
82 | void (*construct)(void *, kmem_zone_t *, unsigned long)) | 82 | void (*construct)(void *, kmem_zone_t *, unsigned long)) |
83 | { | 83 | { |
84 | return kmem_cache_create(zone_name, size, 0, flags, construct, NULL); | 84 | return kmem_cache_create(zone_name, size, 0, flags, construct); |
85 | } | 85 | } |
86 | 86 | ||
87 | static inline void | 87 | static inline void |
diff --git a/include/linux/i2o.h b/include/linux/i2o.h index 333a370a3bdc..9752307d16ba 100644 --- a/include/linux/i2o.h +++ b/include/linux/i2o.h | |||
@@ -946,8 +946,7 @@ static inline int i2o_pool_alloc(struct i2o_pool *pool, const char *name, | |||
946 | strcpy(pool->name, name); | 946 | strcpy(pool->name, name); |
947 | 947 | ||
948 | pool->slab = | 948 | pool->slab = |
949 | kmem_cache_create(pool->name, size, 0, SLAB_HWCACHE_ALIGN, NULL, | 949 | kmem_cache_create(pool->name, size, 0, SLAB_HWCACHE_ALIGN, NULL); |
950 | NULL); | ||
951 | if (!pool->slab) | 950 | if (!pool->slab) |
952 | goto free_name; | 951 | goto free_name; |
953 | 952 | ||
diff --git a/include/linux/slab.h b/include/linux/slab.h index 0e1d0daef6a2..7d0ecc1659f0 100644 --- a/include/linux/slab.h +++ b/include/linux/slab.h | |||
@@ -51,7 +51,6 @@ int slab_is_available(void); | |||
51 | 51 | ||
52 | struct kmem_cache *kmem_cache_create(const char *, size_t, size_t, | 52 | struct kmem_cache *kmem_cache_create(const char *, size_t, size_t, |
53 | unsigned long, | 53 | unsigned long, |
54 | void (*)(void *, struct kmem_cache *, unsigned long), | ||
55 | void (*)(void *, struct kmem_cache *, unsigned long)); | 54 | void (*)(void *, struct kmem_cache *, unsigned long)); |
56 | void kmem_cache_destroy(struct kmem_cache *); | 55 | void kmem_cache_destroy(struct kmem_cache *); |
57 | int kmem_cache_shrink(struct kmem_cache *); | 56 | int kmem_cache_shrink(struct kmem_cache *); |
@@ -70,7 +69,7 @@ int kmem_ptr_validate(struct kmem_cache *cachep, const void *ptr); | |||
70 | */ | 69 | */ |
71 | #define KMEM_CACHE(__struct, __flags) kmem_cache_create(#__struct,\ | 70 | #define KMEM_CACHE(__struct, __flags) kmem_cache_create(#__struct,\ |
72 | sizeof(struct __struct), __alignof__(struct __struct),\ | 71 | sizeof(struct __struct), __alignof__(struct __struct),\ |
73 | (__flags), NULL, NULL) | 72 | (__flags), NULL) |
74 | 73 | ||
75 | /* | 74 | /* |
76 | * The largest kmalloc size supported by the slab allocators is | 75 | * The largest kmalloc size supported by the slab allocators is |
diff --git a/ipc/mqueue.c b/ipc/mqueue.c index a242c83d89d6..145d5a0d299f 100644 --- a/ipc/mqueue.c +++ b/ipc/mqueue.c | |||
@@ -1253,7 +1253,7 @@ static int __init init_mqueue_fs(void) | |||
1253 | 1253 | ||
1254 | mqueue_inode_cachep = kmem_cache_create("mqueue_inode_cache", | 1254 | mqueue_inode_cachep = kmem_cache_create("mqueue_inode_cache", |
1255 | sizeof(struct mqueue_inode_info), 0, | 1255 | sizeof(struct mqueue_inode_info), 0, |
1256 | SLAB_HWCACHE_ALIGN, init_once, NULL); | 1256 | SLAB_HWCACHE_ALIGN, init_once); |
1257 | if (mqueue_inode_cachep == NULL) | 1257 | if (mqueue_inode_cachep == NULL) |
1258 | return -ENOMEM; | 1258 | return -ENOMEM; |
1259 | 1259 | ||
diff --git a/kernel/fork.c b/kernel/fork.c index 469838998220..7332e236d367 100644 --- a/kernel/fork.c +++ b/kernel/fork.c | |||
@@ -137,7 +137,7 @@ void __init fork_init(unsigned long mempages) | |||
137 | /* create a slab on which task_structs can be allocated */ | 137 | /* create a slab on which task_structs can be allocated */ |
138 | task_struct_cachep = | 138 | task_struct_cachep = |
139 | kmem_cache_create("task_struct", sizeof(struct task_struct), | 139 | kmem_cache_create("task_struct", sizeof(struct task_struct), |
140 | ARCH_MIN_TASKALIGN, SLAB_PANIC, NULL, NULL); | 140 | ARCH_MIN_TASKALIGN, SLAB_PANIC, NULL); |
141 | #endif | 141 | #endif |
142 | 142 | ||
143 | /* | 143 | /* |
@@ -1446,22 +1446,22 @@ void __init proc_caches_init(void) | |||
1446 | sighand_cachep = kmem_cache_create("sighand_cache", | 1446 | sighand_cachep = kmem_cache_create("sighand_cache", |
1447 | sizeof(struct sighand_struct), 0, | 1447 | sizeof(struct sighand_struct), 0, |
1448 | SLAB_HWCACHE_ALIGN|SLAB_PANIC|SLAB_DESTROY_BY_RCU, | 1448 | SLAB_HWCACHE_ALIGN|SLAB_PANIC|SLAB_DESTROY_BY_RCU, |
1449 | sighand_ctor, NULL); | 1449 | sighand_ctor); |
1450 | signal_cachep = kmem_cache_create("signal_cache", | 1450 | signal_cachep = kmem_cache_create("signal_cache", |
1451 | sizeof(struct signal_struct), 0, | 1451 | sizeof(struct signal_struct), 0, |
1452 | SLAB_HWCACHE_ALIGN|SLAB_PANIC, NULL, NULL); | 1452 | SLAB_HWCACHE_ALIGN|SLAB_PANIC, NULL); |
1453 | files_cachep = kmem_cache_create("files_cache", | 1453 | files_cachep = kmem_cache_create("files_cache", |
1454 | sizeof(struct files_struct), 0, | 1454 | sizeof(struct files_struct), 0, |
1455 | SLAB_HWCACHE_ALIGN|SLAB_PANIC, NULL, NULL); | 1455 | SLAB_HWCACHE_ALIGN|SLAB_PANIC, NULL); |
1456 | fs_cachep = kmem_cache_create("fs_cache", | 1456 | fs_cachep = kmem_cache_create("fs_cache", |
1457 | sizeof(struct fs_struct), 0, | 1457 | sizeof(struct fs_struct), 0, |
1458 | SLAB_HWCACHE_ALIGN|SLAB_PANIC, NULL, NULL); | 1458 | SLAB_HWCACHE_ALIGN|SLAB_PANIC, NULL); |
1459 | vm_area_cachep = kmem_cache_create("vm_area_struct", | 1459 | vm_area_cachep = kmem_cache_create("vm_area_struct", |
1460 | sizeof(struct vm_area_struct), 0, | 1460 | sizeof(struct vm_area_struct), 0, |
1461 | SLAB_PANIC, NULL, NULL); | 1461 | SLAB_PANIC, NULL); |
1462 | mm_cachep = kmem_cache_create("mm_struct", | 1462 | mm_cachep = kmem_cache_create("mm_struct", |
1463 | sizeof(struct mm_struct), ARCH_MIN_MMSTRUCT_ALIGN, | 1463 | sizeof(struct mm_struct), ARCH_MIN_MMSTRUCT_ALIGN, |
1464 | SLAB_HWCACHE_ALIGN|SLAB_PANIC, NULL, NULL); | 1464 | SLAB_HWCACHE_ALIGN|SLAB_PANIC, NULL); |
1465 | } | 1465 | } |
1466 | 1466 | ||
1467 | /* | 1467 | /* |
diff --git a/kernel/nsproxy.c b/kernel/nsproxy.c index 10f0bbba382b..a4fb7d46971f 100644 --- a/kernel/nsproxy.c +++ b/kernel/nsproxy.c | |||
@@ -193,7 +193,7 @@ int unshare_nsproxy_namespaces(unsigned long unshare_flags, | |||
193 | static int __init nsproxy_cache_init(void) | 193 | static int __init nsproxy_cache_init(void) |
194 | { | 194 | { |
195 | nsproxy_cachep = kmem_cache_create("nsproxy", sizeof(struct nsproxy), | 195 | nsproxy_cachep = kmem_cache_create("nsproxy", sizeof(struct nsproxy), |
196 | 0, SLAB_PANIC, NULL, NULL); | 196 | 0, SLAB_PANIC, NULL); |
197 | return 0; | 197 | return 0; |
198 | } | 198 | } |
199 | 199 | ||
diff --git a/kernel/posix-timers.c b/kernel/posix-timers.c index 329ce0172074..55b3761edaa9 100644 --- a/kernel/posix-timers.c +++ b/kernel/posix-timers.c | |||
@@ -241,7 +241,7 @@ static __init int init_posix_timers(void) | |||
241 | register_posix_clock(CLOCK_MONOTONIC, &clock_monotonic); | 241 | register_posix_clock(CLOCK_MONOTONIC, &clock_monotonic); |
242 | 242 | ||
243 | posix_timers_cache = kmem_cache_create("posix_timers_cache", | 243 | posix_timers_cache = kmem_cache_create("posix_timers_cache", |
244 | sizeof (struct k_itimer), 0, 0, NULL, NULL); | 244 | sizeof (struct k_itimer), 0, 0, NULL); |
245 | idr_init(&posix_timers_id); | 245 | idr_init(&posix_timers_id); |
246 | return 0; | 246 | return 0; |
247 | } | 247 | } |
diff --git a/kernel/user.c b/kernel/user.c index 98b82507797a..e7d11cef6998 100644 --- a/kernel/user.c +++ b/kernel/user.c | |||
@@ -208,7 +208,7 @@ static int __init uid_cache_init(void) | |||
208 | int n; | 208 | int n; |
209 | 209 | ||
210 | uid_cachep = kmem_cache_create("uid_cache", sizeof(struct user_struct), | 210 | uid_cachep = kmem_cache_create("uid_cache", sizeof(struct user_struct), |
211 | 0, SLAB_HWCACHE_ALIGN|SLAB_PANIC, NULL, NULL); | 211 | 0, SLAB_HWCACHE_ALIGN|SLAB_PANIC, NULL); |
212 | 212 | ||
213 | for(n = 0; n < UIDHASH_SZ; ++n) | 213 | for(n = 0; n < UIDHASH_SZ; ++n) |
214 | INIT_LIST_HEAD(init_user_ns.uidhash_table + n); | 214 | INIT_LIST_HEAD(init_user_ns.uidhash_table + n); |
@@ -590,7 +590,7 @@ static int init_id_cache(void) | |||
590 | { | 590 | { |
591 | if (!idr_layer_cache) | 591 | if (!idr_layer_cache) |
592 | idr_layer_cache = kmem_cache_create("idr_layer_cache", | 592 | idr_layer_cache = kmem_cache_create("idr_layer_cache", |
593 | sizeof(struct idr_layer), 0, 0, idr_cache_ctor, NULL); | 593 | sizeof(struct idr_layer), 0, 0, idr_cache_ctor); |
594 | return 0; | 594 | return 0; |
595 | } | 595 | } |
596 | 596 | ||
diff --git a/lib/radix-tree.c b/lib/radix-tree.c index 9927cca14cb7..514efb200be6 100644 --- a/lib/radix-tree.c +++ b/lib/radix-tree.c | |||
@@ -1021,7 +1021,7 @@ void __init radix_tree_init(void) | |||
1021 | { | 1021 | { |
1022 | radix_tree_node_cachep = kmem_cache_create("radix_tree_node", | 1022 | radix_tree_node_cachep = kmem_cache_create("radix_tree_node", |
1023 | sizeof(struct radix_tree_node), 0, | 1023 | sizeof(struct radix_tree_node), 0, |
1024 | SLAB_PANIC, radix_tree_node_ctor, NULL); | 1024 | SLAB_PANIC, radix_tree_node_ctor); |
1025 | radix_tree_init_maxindex(); | 1025 | radix_tree_init_maxindex(); |
1026 | hotcpu_notifier(radix_tree_callback, 0); | 1026 | hotcpu_notifier(radix_tree_callback, 0); |
1027 | } | 1027 | } |
diff --git a/mm/mempolicy.c b/mm/mempolicy.c index 9f4e9b95e8f2..71b84b45154a 100644 --- a/mm/mempolicy.c +++ b/mm/mempolicy.c | |||
@@ -1605,11 +1605,11 @@ void __init numa_policy_init(void) | |||
1605 | 1605 | ||
1606 | policy_cache = kmem_cache_create("numa_policy", | 1606 | policy_cache = kmem_cache_create("numa_policy", |
1607 | sizeof(struct mempolicy), | 1607 | sizeof(struct mempolicy), |
1608 | 0, SLAB_PANIC, NULL, NULL); | 1608 | 0, SLAB_PANIC, NULL); |
1609 | 1609 | ||
1610 | sn_cache = kmem_cache_create("shared_policy_node", | 1610 | sn_cache = kmem_cache_create("shared_policy_node", |
1611 | sizeof(struct sp_node), | 1611 | sizeof(struct sp_node), |
1612 | 0, SLAB_PANIC, NULL, NULL); | 1612 | 0, SLAB_PANIC, NULL); |
1613 | 1613 | ||
1614 | /* | 1614 | /* |
1615 | * Set interleaving policy for system init. Interleaving is only | 1615 | * Set interleaving policy for system init. Interleaving is only |
@@ -149,7 +149,7 @@ static void anon_vma_ctor(void *data, struct kmem_cache *cachep, | |||
149 | void __init anon_vma_init(void) | 149 | void __init anon_vma_init(void) |
150 | { | 150 | { |
151 | anon_vma_cachep = kmem_cache_create("anon_vma", sizeof(struct anon_vma), | 151 | anon_vma_cachep = kmem_cache_create("anon_vma", sizeof(struct anon_vma), |
152 | 0, SLAB_DESTROY_BY_RCU|SLAB_PANIC, anon_vma_ctor, NULL); | 152 | 0, SLAB_DESTROY_BY_RCU|SLAB_PANIC, anon_vma_ctor); |
153 | } | 153 | } |
154 | 154 | ||
155 | /* | 155 | /* |
diff --git a/mm/shmem.c b/mm/shmem.c index ad155c7745dc..fcd19d323f9f 100644 --- a/mm/shmem.c +++ b/mm/shmem.c | |||
@@ -2322,7 +2322,7 @@ static int init_inodecache(void) | |||
2322 | { | 2322 | { |
2323 | shmem_inode_cachep = kmem_cache_create("shmem_inode_cache", | 2323 | shmem_inode_cachep = kmem_cache_create("shmem_inode_cache", |
2324 | sizeof(struct shmem_inode_info), | 2324 | sizeof(struct shmem_inode_info), |
2325 | 0, 0, init_once, NULL); | 2325 | 0, 0, init_once); |
2326 | if (shmem_inode_cachep == NULL) | 2326 | if (shmem_inode_cachep == NULL) |
2327 | return -ENOMEM; | 2327 | return -ENOMEM; |
2328 | return 0; | 2328 | return 0; |
@@ -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(); |
@@ -492,8 +492,7 @@ struct kmem_cache { | |||
492 | 492 | ||
493 | struct kmem_cache *kmem_cache_create(const char *name, size_t size, | 493 | struct kmem_cache *kmem_cache_create(const char *name, size_t size, |
494 | size_t align, unsigned long flags, | 494 | size_t align, unsigned long flags, |
495 | void (*ctor)(void*, struct kmem_cache *, unsigned long), | 495 | void (*ctor)(void*, struct kmem_cache *, unsigned long)) |
496 | void (*dtor)(void*, struct kmem_cache *, unsigned long)) | ||
497 | { | 496 | { |
498 | struct kmem_cache *c; | 497 | struct kmem_cache *c; |
499 | 498 | ||
@@ -2668,12 +2668,10 @@ static struct kmem_cache *find_mergeable(size_t size, | |||
2668 | 2668 | ||
2669 | struct kmem_cache *kmem_cache_create(const char *name, size_t size, | 2669 | struct kmem_cache *kmem_cache_create(const char *name, size_t size, |
2670 | size_t align, unsigned long flags, | 2670 | size_t align, unsigned long flags, |
2671 | void (*ctor)(void *, struct kmem_cache *, unsigned long), | 2671 | void (*ctor)(void *, struct kmem_cache *, unsigned long)) |
2672 | void (*dtor)(void *, struct kmem_cache *, unsigned long)) | ||
2673 | { | 2672 | { |
2674 | struct kmem_cache *s; | 2673 | struct kmem_cache *s; |
2675 | 2674 | ||
2676 | BUG_ON(dtor); | ||
2677 | down_write(&slub_lock); | 2675 | down_write(&slub_lock); |
2678 | s = find_mergeable(size, align, flags, ctor); | 2676 | s = find_mergeable(size, align, flags, ctor); |
2679 | if (s) { | 2677 | if (s) { |
diff --git a/net/bridge/br_fdb.c b/net/bridge/br_fdb.c index 3fc697293819..69b70977f000 100644 --- a/net/bridge/br_fdb.c +++ b/net/bridge/br_fdb.c | |||
@@ -36,7 +36,7 @@ int __init br_fdb_init(void) | |||
36 | br_fdb_cache = kmem_cache_create("bridge_fdb_cache", | 36 | br_fdb_cache = kmem_cache_create("bridge_fdb_cache", |
37 | sizeof(struct net_bridge_fdb_entry), | 37 | sizeof(struct net_bridge_fdb_entry), |
38 | 0, | 38 | 0, |
39 | SLAB_HWCACHE_ALIGN, NULL, NULL); | 39 | SLAB_HWCACHE_ALIGN, NULL); |
40 | if (!br_fdb_cache) | 40 | if (!br_fdb_cache) |
41 | return -ENOMEM; | 41 | return -ENOMEM; |
42 | 42 | ||
diff --git a/net/core/flow.c b/net/core/flow.c index 051430545a05..0ab5234b17d8 100644 --- a/net/core/flow.c +++ b/net/core/flow.c | |||
@@ -350,7 +350,7 @@ static int __init flow_cache_init(void) | |||
350 | flow_cachep = kmem_cache_create("flow_cache", | 350 | flow_cachep = kmem_cache_create("flow_cache", |
351 | sizeof(struct flow_cache_entry), | 351 | sizeof(struct flow_cache_entry), |
352 | 0, SLAB_HWCACHE_ALIGN|SLAB_PANIC, | 352 | 0, SLAB_HWCACHE_ALIGN|SLAB_PANIC, |
353 | NULL, NULL); | 353 | NULL); |
354 | flow_hash_shift = 10; | 354 | flow_hash_shift = 10; |
355 | flow_lwm = 2 * flow_hash_size; | 355 | flow_lwm = 2 * flow_hash_size; |
356 | flow_hwm = 4 * flow_hash_size; | 356 | flow_hwm = 4 * flow_hash_size; |
diff --git a/net/core/neighbour.c b/net/core/neighbour.c index 9df26a07f067..ca2a1533138a 100644 --- a/net/core/neighbour.c +++ b/net/core/neighbour.c | |||
@@ -1347,7 +1347,7 @@ void neigh_table_init_no_netlink(struct neigh_table *tbl) | |||
1347 | tbl->kmem_cachep = | 1347 | tbl->kmem_cachep = |
1348 | kmem_cache_create(tbl->id, tbl->entry_size, 0, | 1348 | kmem_cache_create(tbl->id, tbl->entry_size, 0, |
1349 | SLAB_HWCACHE_ALIGN|SLAB_PANIC, | 1349 | SLAB_HWCACHE_ALIGN|SLAB_PANIC, |
1350 | NULL, NULL); | 1350 | NULL); |
1351 | tbl->stats = alloc_percpu(struct neigh_statistics); | 1351 | tbl->stats = alloc_percpu(struct neigh_statistics); |
1352 | if (!tbl->stats) | 1352 | if (!tbl->stats) |
1353 | panic("cannot create neighbour cache statistics"); | 1353 | panic("cannot create neighbour cache statistics"); |
diff --git a/net/core/skbuff.c b/net/core/skbuff.c index 0583e8498f13..35021eb3ed07 100644 --- a/net/core/skbuff.c +++ b/net/core/skbuff.c | |||
@@ -2021,13 +2021,13 @@ void __init skb_init(void) | |||
2021 | sizeof(struct sk_buff), | 2021 | sizeof(struct sk_buff), |
2022 | 0, | 2022 | 0, |
2023 | SLAB_HWCACHE_ALIGN|SLAB_PANIC, | 2023 | SLAB_HWCACHE_ALIGN|SLAB_PANIC, |
2024 | NULL, NULL); | 2024 | NULL); |
2025 | skbuff_fclone_cache = kmem_cache_create("skbuff_fclone_cache", | 2025 | skbuff_fclone_cache = kmem_cache_create("skbuff_fclone_cache", |
2026 | (2*sizeof(struct sk_buff)) + | 2026 | (2*sizeof(struct sk_buff)) + |
2027 | sizeof(atomic_t), | 2027 | sizeof(atomic_t), |
2028 | 0, | 2028 | 0, |
2029 | SLAB_HWCACHE_ALIGN|SLAB_PANIC, | 2029 | SLAB_HWCACHE_ALIGN|SLAB_PANIC, |
2030 | NULL, NULL); | 2030 | NULL); |
2031 | } | 2031 | } |
2032 | 2032 | ||
2033 | /** | 2033 | /** |
diff --git a/net/core/sock.c b/net/core/sock.c index 239a08a6ff24..bd209c4477a9 100644 --- a/net/core/sock.c +++ b/net/core/sock.c | |||
@@ -1767,7 +1767,7 @@ int proto_register(struct proto *prot, int alloc_slab) | |||
1767 | 1767 | ||
1768 | if (alloc_slab) { | 1768 | if (alloc_slab) { |
1769 | prot->slab = kmem_cache_create(prot->name, prot->obj_size, 0, | 1769 | prot->slab = kmem_cache_create(prot->name, prot->obj_size, 0, |
1770 | SLAB_HWCACHE_ALIGN, NULL, NULL); | 1770 | SLAB_HWCACHE_ALIGN, NULL); |
1771 | 1771 | ||
1772 | if (prot->slab == NULL) { | 1772 | if (prot->slab == NULL) { |
1773 | printk(KERN_CRIT "%s: Can't create sock SLAB cache!\n", | 1773 | printk(KERN_CRIT "%s: Can't create sock SLAB cache!\n", |
@@ -1785,7 +1785,7 @@ int proto_register(struct proto *prot, int alloc_slab) | |||
1785 | sprintf(request_sock_slab_name, mask, prot->name); | 1785 | sprintf(request_sock_slab_name, mask, prot->name); |
1786 | prot->rsk_prot->slab = kmem_cache_create(request_sock_slab_name, | 1786 | prot->rsk_prot->slab = kmem_cache_create(request_sock_slab_name, |
1787 | prot->rsk_prot->obj_size, 0, | 1787 | prot->rsk_prot->obj_size, 0, |
1788 | SLAB_HWCACHE_ALIGN, NULL, NULL); | 1788 | SLAB_HWCACHE_ALIGN, NULL); |
1789 | 1789 | ||
1790 | if (prot->rsk_prot->slab == NULL) { | 1790 | if (prot->rsk_prot->slab == NULL) { |
1791 | printk(KERN_CRIT "%s: Can't create request sock SLAB cache!\n", | 1791 | printk(KERN_CRIT "%s: Can't create request sock SLAB cache!\n", |
@@ -1807,7 +1807,7 @@ int proto_register(struct proto *prot, int alloc_slab) | |||
1807 | kmem_cache_create(timewait_sock_slab_name, | 1807 | kmem_cache_create(timewait_sock_slab_name, |
1808 | prot->twsk_prot->twsk_obj_size, | 1808 | prot->twsk_prot->twsk_obj_size, |
1809 | 0, SLAB_HWCACHE_ALIGN, | 1809 | 0, SLAB_HWCACHE_ALIGN, |
1810 | NULL, NULL); | 1810 | NULL); |
1811 | if (prot->twsk_prot->twsk_slab == NULL) | 1811 | if (prot->twsk_prot->twsk_slab == NULL) |
1812 | goto out_free_timewait_sock_slab_name; | 1812 | goto out_free_timewait_sock_slab_name; |
1813 | } | 1813 | } |
diff --git a/net/dccp/ackvec.c b/net/dccp/ackvec.c index 01030f346177..7ac775f9a64b 100644 --- a/net/dccp/ackvec.c +++ b/net/dccp/ackvec.c | |||
@@ -481,14 +481,14 @@ int __init dccp_ackvec_init(void) | |||
481 | { | 481 | { |
482 | dccp_ackvec_slab = kmem_cache_create("dccp_ackvec", | 482 | dccp_ackvec_slab = kmem_cache_create("dccp_ackvec", |
483 | sizeof(struct dccp_ackvec), 0, | 483 | sizeof(struct dccp_ackvec), 0, |
484 | SLAB_HWCACHE_ALIGN, NULL, NULL); | 484 | SLAB_HWCACHE_ALIGN, NULL); |
485 | if (dccp_ackvec_slab == NULL) | 485 | if (dccp_ackvec_slab == NULL) |
486 | goto out_err; | 486 | goto out_err; |
487 | 487 | ||
488 | dccp_ackvec_record_slab = | 488 | dccp_ackvec_record_slab = |
489 | kmem_cache_create("dccp_ackvec_record", | 489 | kmem_cache_create("dccp_ackvec_record", |
490 | sizeof(struct dccp_ackvec_record), | 490 | sizeof(struct dccp_ackvec_record), |
491 | 0, SLAB_HWCACHE_ALIGN, NULL, NULL); | 491 | 0, SLAB_HWCACHE_ALIGN, NULL); |
492 | if (dccp_ackvec_record_slab == NULL) | 492 | if (dccp_ackvec_record_slab == NULL) |
493 | goto out_destroy_slab; | 493 | goto out_destroy_slab; |
494 | 494 | ||
diff --git a/net/dccp/ccid.c b/net/dccp/ccid.c index d8cf92f09e68..ccbf72c793b6 100644 --- a/net/dccp/ccid.c +++ b/net/dccp/ccid.c | |||
@@ -69,7 +69,7 @@ static struct kmem_cache *ccid_kmem_cache_create(int obj_size, const char *fmt,. | |||
69 | if (slab_name == NULL) | 69 | if (slab_name == NULL) |
70 | return NULL; | 70 | return NULL; |
71 | slab = kmem_cache_create(slab_name, sizeof(struct ccid) + obj_size, 0, | 71 | slab = kmem_cache_create(slab_name, sizeof(struct ccid) + obj_size, 0, |
72 | SLAB_HWCACHE_ALIGN, NULL, NULL); | 72 | SLAB_HWCACHE_ALIGN, NULL); |
73 | if (slab == NULL) | 73 | if (slab == NULL) |
74 | kfree(slab_name); | 74 | kfree(slab_name); |
75 | return slab; | 75 | return slab; |
diff --git a/net/dccp/ccids/lib/loss_interval.c b/net/dccp/ccids/lib/loss_interval.c index dd0fc992b042..174d3f13d93f 100644 --- a/net/dccp/ccids/lib/loss_interval.c +++ b/net/dccp/ccids/lib/loss_interval.c | |||
@@ -282,7 +282,7 @@ static __init int dccp_li_init(void) | |||
282 | { | 282 | { |
283 | dccp_li_cachep = kmem_cache_create("dccp_li_hist", | 283 | dccp_li_cachep = kmem_cache_create("dccp_li_hist", |
284 | sizeof(struct dccp_li_hist_entry), | 284 | sizeof(struct dccp_li_hist_entry), |
285 | 0, SLAB_HWCACHE_ALIGN, NULL, NULL); | 285 | 0, SLAB_HWCACHE_ALIGN, NULL); |
286 | return dccp_li_cachep == NULL ? -ENOBUFS : 0; | 286 | return dccp_li_cachep == NULL ? -ENOBUFS : 0; |
287 | } | 287 | } |
288 | 288 | ||
diff --git a/net/dccp/ccids/lib/packet_history.c b/net/dccp/ccids/lib/packet_history.c index 2e8ef42721e2..34c4f6047724 100644 --- a/net/dccp/ccids/lib/packet_history.c +++ b/net/dccp/ccids/lib/packet_history.c | |||
@@ -59,7 +59,7 @@ struct dccp_tx_hist *dccp_tx_hist_new(const char *name) | |||
59 | hist->dccptxh_slab = kmem_cache_create(slab_name, | 59 | hist->dccptxh_slab = kmem_cache_create(slab_name, |
60 | sizeof(struct dccp_tx_hist_entry), | 60 | sizeof(struct dccp_tx_hist_entry), |
61 | 0, SLAB_HWCACHE_ALIGN, | 61 | 0, SLAB_HWCACHE_ALIGN, |
62 | NULL, NULL); | 62 | NULL); |
63 | if (hist->dccptxh_slab == NULL) | 63 | if (hist->dccptxh_slab == NULL) |
64 | goto out_free_slab_name; | 64 | goto out_free_slab_name; |
65 | out: | 65 | out: |
@@ -148,7 +148,7 @@ struct dccp_rx_hist *dccp_rx_hist_new(const char *name) | |||
148 | hist->dccprxh_slab = kmem_cache_create(slab_name, | 148 | hist->dccprxh_slab = kmem_cache_create(slab_name, |
149 | sizeof(struct dccp_rx_hist_entry), | 149 | sizeof(struct dccp_rx_hist_entry), |
150 | 0, SLAB_HWCACHE_ALIGN, | 150 | 0, SLAB_HWCACHE_ALIGN, |
151 | NULL, NULL); | 151 | NULL); |
152 | if (hist->dccprxh_slab == NULL) | 152 | if (hist->dccprxh_slab == NULL) |
153 | goto out_free_slab_name; | 153 | goto out_free_slab_name; |
154 | out: | 154 | out: |
diff --git a/net/dccp/proto.c b/net/dccp/proto.c index 6607b7b14f34..04b59ec4f512 100644 --- a/net/dccp/proto.c +++ b/net/dccp/proto.c | |||
@@ -1003,7 +1003,7 @@ static int __init dccp_init(void) | |||
1003 | dccp_hashinfo.bind_bucket_cachep = | 1003 | dccp_hashinfo.bind_bucket_cachep = |
1004 | kmem_cache_create("dccp_bind_bucket", | 1004 | kmem_cache_create("dccp_bind_bucket", |
1005 | sizeof(struct inet_bind_bucket), 0, | 1005 | sizeof(struct inet_bind_bucket), 0, |
1006 | SLAB_HWCACHE_ALIGN, NULL, NULL); | 1006 | SLAB_HWCACHE_ALIGN, NULL); |
1007 | if (!dccp_hashinfo.bind_bucket_cachep) | 1007 | if (!dccp_hashinfo.bind_bucket_cachep) |
1008 | goto out; | 1008 | goto out; |
1009 | 1009 | ||
diff --git a/net/decnet/dn_route.c b/net/decnet/dn_route.c index 82622fb6f68f..f2a61ef2af9c 100644 --- a/net/decnet/dn_route.c +++ b/net/decnet/dn_route.c | |||
@@ -1770,7 +1770,7 @@ void __init dn_route_init(void) | |||
1770 | 1770 | ||
1771 | dn_dst_ops.kmem_cachep = | 1771 | dn_dst_ops.kmem_cachep = |
1772 | kmem_cache_create("dn_dst_cache", sizeof(struct dn_route), 0, | 1772 | kmem_cache_create("dn_dst_cache", sizeof(struct dn_route), 0, |
1773 | SLAB_HWCACHE_ALIGN|SLAB_PANIC, NULL, NULL); | 1773 | SLAB_HWCACHE_ALIGN|SLAB_PANIC, NULL); |
1774 | init_timer(&dn_route_timer); | 1774 | init_timer(&dn_route_timer); |
1775 | dn_route_timer.function = dn_dst_check_expire; | 1775 | dn_route_timer.function = dn_dst_check_expire; |
1776 | dn_route_timer.expires = jiffies + decnet_dst_gc_interval * HZ; | 1776 | dn_route_timer.expires = jiffies + decnet_dst_gc_interval * HZ; |
diff --git a/net/decnet/dn_table.c b/net/decnet/dn_table.c index d6615c9361e9..fda0772fa215 100644 --- a/net/decnet/dn_table.c +++ b/net/decnet/dn_table.c | |||
@@ -881,7 +881,7 @@ void __init dn_fib_table_init(void) | |||
881 | dn_hash_kmem = kmem_cache_create("dn_fib_info_cache", | 881 | dn_hash_kmem = kmem_cache_create("dn_fib_info_cache", |
882 | sizeof(struct dn_fib_info), | 882 | sizeof(struct dn_fib_info), |
883 | 0, SLAB_HWCACHE_ALIGN, | 883 | 0, SLAB_HWCACHE_ALIGN, |
884 | NULL, NULL); | 884 | NULL); |
885 | } | 885 | } |
886 | 886 | ||
887 | void __exit dn_fib_table_cleanup(void) | 887 | void __exit dn_fib_table_cleanup(void) |
diff --git a/net/ipv4/fib_hash.c b/net/ipv4/fib_hash.c index 07e843a47dde..9ad1d9ff9ce7 100644 --- a/net/ipv4/fib_hash.c +++ b/net/ipv4/fib_hash.c | |||
@@ -771,13 +771,13 @@ struct fib_table * __init fib_hash_init(u32 id) | |||
771 | fn_hash_kmem = kmem_cache_create("ip_fib_hash", | 771 | fn_hash_kmem = kmem_cache_create("ip_fib_hash", |
772 | sizeof(struct fib_node), | 772 | sizeof(struct fib_node), |
773 | 0, SLAB_HWCACHE_ALIGN, | 773 | 0, SLAB_HWCACHE_ALIGN, |
774 | NULL, NULL); | 774 | NULL); |
775 | 775 | ||
776 | if (fn_alias_kmem == NULL) | 776 | if (fn_alias_kmem == NULL) |
777 | fn_alias_kmem = kmem_cache_create("ip_fib_alias", | 777 | fn_alias_kmem = kmem_cache_create("ip_fib_alias", |
778 | sizeof(struct fib_alias), | 778 | sizeof(struct fib_alias), |
779 | 0, SLAB_HWCACHE_ALIGN, | 779 | 0, SLAB_HWCACHE_ALIGN, |
780 | NULL, NULL); | 780 | NULL); |
781 | 781 | ||
782 | tb = kmalloc(sizeof(struct fib_table) + sizeof(struct fn_hash), | 782 | tb = kmalloc(sizeof(struct fib_table) + sizeof(struct fn_hash), |
783 | GFP_KERNEL); | 783 | GFP_KERNEL); |
diff --git a/net/ipv4/fib_trie.c b/net/ipv4/fib_trie.c index 30e332ade61b..9ca786a6fd3c 100644 --- a/net/ipv4/fib_trie.c +++ b/net/ipv4/fib_trie.c | |||
@@ -1970,7 +1970,7 @@ struct fib_table * __init fib_hash_init(u32 id) | |||
1970 | fn_alias_kmem = kmem_cache_create("ip_fib_alias", | 1970 | fn_alias_kmem = kmem_cache_create("ip_fib_alias", |
1971 | sizeof(struct fib_alias), | 1971 | sizeof(struct fib_alias), |
1972 | 0, SLAB_HWCACHE_ALIGN, | 1972 | 0, SLAB_HWCACHE_ALIGN, |
1973 | NULL, NULL); | 1973 | NULL); |
1974 | 1974 | ||
1975 | tb = kmalloc(sizeof(struct fib_table) + sizeof(struct trie), | 1975 | tb = kmalloc(sizeof(struct fib_table) + sizeof(struct trie), |
1976 | GFP_KERNEL); | 1976 | GFP_KERNEL); |
diff --git a/net/ipv4/inetpeer.c b/net/ipv4/inetpeer.c index 2f44e6128068..6cbce96a54ce 100644 --- a/net/ipv4/inetpeer.c +++ b/net/ipv4/inetpeer.c | |||
@@ -123,7 +123,7 @@ void __init inet_initpeers(void) | |||
123 | peer_cachep = kmem_cache_create("inet_peer_cache", | 123 | peer_cachep = kmem_cache_create("inet_peer_cache", |
124 | sizeof(struct inet_peer), | 124 | sizeof(struct inet_peer), |
125 | 0, SLAB_HWCACHE_ALIGN|SLAB_PANIC, | 125 | 0, SLAB_HWCACHE_ALIGN|SLAB_PANIC, |
126 | NULL, NULL); | 126 | NULL); |
127 | 127 | ||
128 | /* All the timers, started at system startup tend | 128 | /* All the timers, started at system startup tend |
129 | to synchronize. Perturb it a bit. | 129 | to synchronize. Perturb it a bit. |
diff --git a/net/ipv4/ipmr.c b/net/ipv4/ipmr.c index d96582acdf69..7003cc1b7fe2 100644 --- a/net/ipv4/ipmr.c +++ b/net/ipv4/ipmr.c | |||
@@ -1917,7 +1917,7 @@ void __init ip_mr_init(void) | |||
1917 | mrt_cachep = kmem_cache_create("ip_mrt_cache", | 1917 | mrt_cachep = kmem_cache_create("ip_mrt_cache", |
1918 | sizeof(struct mfc_cache), | 1918 | sizeof(struct mfc_cache), |
1919 | 0, SLAB_HWCACHE_ALIGN|SLAB_PANIC, | 1919 | 0, SLAB_HWCACHE_ALIGN|SLAB_PANIC, |
1920 | NULL, NULL); | 1920 | NULL); |
1921 | init_timer(&ipmr_expire_timer); | 1921 | init_timer(&ipmr_expire_timer); |
1922 | ipmr_expire_timer.function=ipmr_expire_process; | 1922 | ipmr_expire_timer.function=ipmr_expire_process; |
1923 | register_netdevice_notifier(&ip_mr_notifier); | 1923 | register_netdevice_notifier(&ip_mr_notifier); |
diff --git a/net/ipv4/ipvs/ip_vs_conn.c b/net/ipv4/ipvs/ip_vs_conn.c index 3b446b1a6b9c..d612a6a5d957 100644 --- a/net/ipv4/ipvs/ip_vs_conn.c +++ b/net/ipv4/ipvs/ip_vs_conn.c | |||
@@ -901,7 +901,7 @@ int ip_vs_conn_init(void) | |||
901 | /* Allocate ip_vs_conn slab cache */ | 901 | /* Allocate ip_vs_conn slab cache */ |
902 | ip_vs_conn_cachep = kmem_cache_create("ip_vs_conn", | 902 | ip_vs_conn_cachep = kmem_cache_create("ip_vs_conn", |
903 | sizeof(struct ip_vs_conn), 0, | 903 | sizeof(struct ip_vs_conn), 0, |
904 | SLAB_HWCACHE_ALIGN, NULL, NULL); | 904 | SLAB_HWCACHE_ALIGN, NULL); |
905 | if (!ip_vs_conn_cachep) { | 905 | if (!ip_vs_conn_cachep) { |
906 | vfree(ip_vs_conn_tab); | 906 | vfree(ip_vs_conn_tab); |
907 | return -ENOMEM; | 907 | return -ENOMEM; |
diff --git a/net/ipv4/route.c b/net/ipv4/route.c index 88fa648d7ba3..df42b7fb3268 100644 --- a/net/ipv4/route.c +++ b/net/ipv4/route.c | |||
@@ -2967,7 +2967,7 @@ int __init ip_rt_init(void) | |||
2967 | 2967 | ||
2968 | ipv4_dst_ops.kmem_cachep = | 2968 | ipv4_dst_ops.kmem_cachep = |
2969 | kmem_cache_create("ip_dst_cache", sizeof(struct rtable), 0, | 2969 | kmem_cache_create("ip_dst_cache", sizeof(struct rtable), 0, |
2970 | SLAB_HWCACHE_ALIGN|SLAB_PANIC, NULL, NULL); | 2970 | SLAB_HWCACHE_ALIGN|SLAB_PANIC, NULL); |
2971 | 2971 | ||
2972 | ipv4_dst_blackhole_ops.kmem_cachep = ipv4_dst_ops.kmem_cachep; | 2972 | ipv4_dst_blackhole_ops.kmem_cachep = ipv4_dst_ops.kmem_cachep; |
2973 | 2973 | ||
diff --git a/net/ipv4/tcp.c b/net/ipv4/tcp.c index 987b94403be5..da4c0b6ab79a 100644 --- a/net/ipv4/tcp.c +++ b/net/ipv4/tcp.c | |||
@@ -2430,7 +2430,7 @@ void __init tcp_init(void) | |||
2430 | tcp_hashinfo.bind_bucket_cachep = | 2430 | tcp_hashinfo.bind_bucket_cachep = |
2431 | kmem_cache_create("tcp_bind_bucket", | 2431 | kmem_cache_create("tcp_bind_bucket", |
2432 | sizeof(struct inet_bind_bucket), 0, | 2432 | sizeof(struct inet_bind_bucket), 0, |
2433 | SLAB_HWCACHE_ALIGN|SLAB_PANIC, NULL, NULL); | 2433 | SLAB_HWCACHE_ALIGN|SLAB_PANIC, NULL); |
2434 | 2434 | ||
2435 | /* Size and allocate the main established and bind bucket | 2435 | /* Size and allocate the main established and bind bucket |
2436 | * hash tables. | 2436 | * hash tables. |
diff --git a/net/ipv6/ip6_fib.c b/net/ipv6/ip6_fib.c index 662a7d9681fd..6a612a701eaa 100644 --- a/net/ipv6/ip6_fib.c +++ b/net/ipv6/ip6_fib.c | |||
@@ -1474,7 +1474,7 @@ void __init fib6_init(void) | |||
1474 | fib6_node_kmem = kmem_cache_create("fib6_nodes", | 1474 | fib6_node_kmem = kmem_cache_create("fib6_nodes", |
1475 | sizeof(struct fib6_node), | 1475 | sizeof(struct fib6_node), |
1476 | 0, SLAB_HWCACHE_ALIGN|SLAB_PANIC, | 1476 | 0, SLAB_HWCACHE_ALIGN|SLAB_PANIC, |
1477 | NULL, NULL); | 1477 | NULL); |
1478 | 1478 | ||
1479 | fib6_tables_init(); | 1479 | fib6_tables_init(); |
1480 | 1480 | ||
diff --git a/net/ipv6/route.c b/net/ipv6/route.c index fe8d9837f9f8..919de682b331 100644 --- a/net/ipv6/route.c +++ b/net/ipv6/route.c | |||
@@ -2555,7 +2555,7 @@ void __init ip6_route_init(void) | |||
2555 | #endif | 2555 | #endif |
2556 | ip6_dst_ops.kmem_cachep = | 2556 | ip6_dst_ops.kmem_cachep = |
2557 | kmem_cache_create("ip6_dst_cache", sizeof(struct rt6_info), 0, | 2557 | kmem_cache_create("ip6_dst_cache", sizeof(struct rt6_info), 0, |
2558 | SLAB_HWCACHE_ALIGN|SLAB_PANIC, NULL, NULL); | 2558 | SLAB_HWCACHE_ALIGN|SLAB_PANIC, NULL); |
2559 | ip6_dst_blackhole_ops.kmem_cachep = ip6_dst_ops.kmem_cachep; | 2559 | ip6_dst_blackhole_ops.kmem_cachep = ip6_dst_ops.kmem_cachep; |
2560 | 2560 | ||
2561 | fib6_init(); | 2561 | fib6_init(); |
diff --git a/net/ipv6/xfrm6_tunnel.c b/net/ipv6/xfrm6_tunnel.c index 6f87dd568ded..30f3236c402a 100644 --- a/net/ipv6/xfrm6_tunnel.c +++ b/net/ipv6/xfrm6_tunnel.c | |||
@@ -84,7 +84,7 @@ static int xfrm6_tunnel_spi_init(void) | |||
84 | xfrm6_tunnel_spi_kmem = kmem_cache_create("xfrm6_tunnel_spi", | 84 | xfrm6_tunnel_spi_kmem = kmem_cache_create("xfrm6_tunnel_spi", |
85 | sizeof(struct xfrm6_tunnel_spi), | 85 | sizeof(struct xfrm6_tunnel_spi), |
86 | 0, SLAB_HWCACHE_ALIGN, | 86 | 0, SLAB_HWCACHE_ALIGN, |
87 | NULL, NULL); | 87 | NULL); |
88 | if (!xfrm6_tunnel_spi_kmem) | 88 | if (!xfrm6_tunnel_spi_kmem) |
89 | return -ENOMEM; | 89 | return -ENOMEM; |
90 | 90 | ||
diff --git a/net/netfilter/nf_conntrack_core.c b/net/netfilter/nf_conntrack_core.c index 8cce814f6bee..aa086c83af80 100644 --- a/net/netfilter/nf_conntrack_core.c +++ b/net/netfilter/nf_conntrack_core.c | |||
@@ -1108,7 +1108,7 @@ int __init nf_conntrack_init(void) | |||
1108 | 1108 | ||
1109 | nf_conntrack_cachep = kmem_cache_create("nf_conntrack", | 1109 | nf_conntrack_cachep = kmem_cache_create("nf_conntrack", |
1110 | sizeof(struct nf_conn), | 1110 | sizeof(struct nf_conn), |
1111 | 0, 0, NULL, NULL); | 1111 | 0, 0, NULL); |
1112 | if (!nf_conntrack_cachep) { | 1112 | if (!nf_conntrack_cachep) { |
1113 | printk(KERN_ERR "Unable to create nf_conn slab cache\n"); | 1113 | printk(KERN_ERR "Unable to create nf_conn slab cache\n"); |
1114 | goto err_free_hash; | 1114 | goto err_free_hash; |
diff --git a/net/netfilter/nf_conntrack_expect.c b/net/netfilter/nf_conntrack_expect.c index 2191fe008f60..1aa6229ca99f 100644 --- a/net/netfilter/nf_conntrack_expect.c +++ b/net/netfilter/nf_conntrack_expect.c | |||
@@ -540,7 +540,7 @@ int __init nf_conntrack_expect_init(void) | |||
540 | 540 | ||
541 | nf_ct_expect_cachep = kmem_cache_create("nf_conntrack_expect", | 541 | nf_ct_expect_cachep = kmem_cache_create("nf_conntrack_expect", |
542 | sizeof(struct nf_conntrack_expect), | 542 | sizeof(struct nf_conntrack_expect), |
543 | 0, 0, NULL, NULL); | 543 | 0, 0, NULL); |
544 | if (!nf_ct_expect_cachep) | 544 | if (!nf_ct_expect_cachep) |
545 | goto err2; | 545 | goto err2; |
546 | 546 | ||
diff --git a/net/netfilter/xt_hashlimit.c b/net/netfilter/xt_hashlimit.c index d6b3d01975b6..bd45f9d3f7d0 100644 --- a/net/netfilter/xt_hashlimit.c +++ b/net/netfilter/xt_hashlimit.c | |||
@@ -738,7 +738,7 @@ static int __init xt_hashlimit_init(void) | |||
738 | err = -ENOMEM; | 738 | err = -ENOMEM; |
739 | hashlimit_cachep = kmem_cache_create("xt_hashlimit", | 739 | hashlimit_cachep = kmem_cache_create("xt_hashlimit", |
740 | sizeof(struct dsthash_ent), 0, 0, | 740 | sizeof(struct dsthash_ent), 0, 0, |
741 | NULL, NULL); | 741 | NULL); |
742 | if (!hashlimit_cachep) { | 742 | if (!hashlimit_cachep) { |
743 | printk(KERN_ERR "xt_hashlimit: unable to create slab cache\n"); | 743 | printk(KERN_ERR "xt_hashlimit: unable to create slab cache\n"); |
744 | goto err2; | 744 | goto err2; |
diff --git a/net/rxrpc/af_rxrpc.c b/net/rxrpc/af_rxrpc.c index 46f6d572ad2d..16a68df4e36b 100644 --- a/net/rxrpc/af_rxrpc.c +++ b/net/rxrpc/af_rxrpc.c | |||
@@ -792,7 +792,7 @@ static int __init af_rxrpc_init(void) | |||
792 | ret = -ENOMEM; | 792 | ret = -ENOMEM; |
793 | rxrpc_call_jar = kmem_cache_create( | 793 | rxrpc_call_jar = kmem_cache_create( |
794 | "rxrpc_call_jar", sizeof(struct rxrpc_call), 0, | 794 | "rxrpc_call_jar", sizeof(struct rxrpc_call), 0, |
795 | SLAB_HWCACHE_ALIGN, NULL, NULL); | 795 | SLAB_HWCACHE_ALIGN, NULL); |
796 | if (!rxrpc_call_jar) { | 796 | if (!rxrpc_call_jar) { |
797 | printk(KERN_NOTICE "RxRPC: Failed to allocate call jar\n"); | 797 | printk(KERN_NOTICE "RxRPC: Failed to allocate call jar\n"); |
798 | goto error_call_jar; | 798 | goto error_call_jar; |
diff --git a/net/sctp/protocol.c b/net/sctp/protocol.c index 34bab36637ac..e98579b788b8 100644 --- a/net/sctp/protocol.c +++ b/net/sctp/protocol.c | |||
@@ -980,14 +980,14 @@ SCTP_STATIC __init int sctp_init(void) | |||
980 | sctp_bucket_cachep = kmem_cache_create("sctp_bind_bucket", | 980 | sctp_bucket_cachep = kmem_cache_create("sctp_bind_bucket", |
981 | sizeof(struct sctp_bind_bucket), | 981 | sizeof(struct sctp_bind_bucket), |
982 | 0, SLAB_HWCACHE_ALIGN, | 982 | 0, SLAB_HWCACHE_ALIGN, |
983 | NULL, NULL); | 983 | NULL); |
984 | if (!sctp_bucket_cachep) | 984 | if (!sctp_bucket_cachep) |
985 | goto out; | 985 | goto out; |
986 | 986 | ||
987 | sctp_chunk_cachep = kmem_cache_create("sctp_chunk", | 987 | sctp_chunk_cachep = kmem_cache_create("sctp_chunk", |
988 | sizeof(struct sctp_chunk), | 988 | sizeof(struct sctp_chunk), |
989 | 0, SLAB_HWCACHE_ALIGN, | 989 | 0, SLAB_HWCACHE_ALIGN, |
990 | NULL, NULL); | 990 | NULL); |
991 | if (!sctp_chunk_cachep) | 991 | if (!sctp_chunk_cachep) |
992 | goto err_chunk_cachep; | 992 | goto err_chunk_cachep; |
993 | 993 | ||
diff --git a/net/socket.c b/net/socket.c index b71114250046..ec077037f534 100644 --- a/net/socket.c +++ b/net/socket.c | |||
@@ -272,8 +272,7 @@ static int init_inodecache(void) | |||
272 | (SLAB_HWCACHE_ALIGN | | 272 | (SLAB_HWCACHE_ALIGN | |
273 | SLAB_RECLAIM_ACCOUNT | | 273 | SLAB_RECLAIM_ACCOUNT | |
274 | SLAB_MEM_SPREAD), | 274 | SLAB_MEM_SPREAD), |
275 | init_once, | 275 | init_once); |
276 | NULL); | ||
277 | if (sock_inode_cachep == NULL) | 276 | if (sock_inode_cachep == NULL) |
278 | return -ENOMEM; | 277 | return -ENOMEM; |
279 | return 0; | 278 | return 0; |
diff --git a/net/sunrpc/rpc_pipe.c b/net/sunrpc/rpc_pipe.c index 5b2b6fb244f2..650af064ff8d 100644 --- a/net/sunrpc/rpc_pipe.c +++ b/net/sunrpc/rpc_pipe.c | |||
@@ -867,7 +867,7 @@ int register_rpc_pipefs(void) | |||
867 | sizeof(struct rpc_inode), | 867 | sizeof(struct rpc_inode), |
868 | 0, (SLAB_HWCACHE_ALIGN|SLAB_RECLAIM_ACCOUNT| | 868 | 0, (SLAB_HWCACHE_ALIGN|SLAB_RECLAIM_ACCOUNT| |
869 | SLAB_MEM_SPREAD), | 869 | SLAB_MEM_SPREAD), |
870 | init_once, NULL); | 870 | init_once); |
871 | if (!rpc_inode_cachep) | 871 | if (!rpc_inode_cachep) |
872 | return -ENOMEM; | 872 | return -ENOMEM; |
873 | err = register_filesystem(&rpc_pipe_fs_type); | 873 | err = register_filesystem(&rpc_pipe_fs_type); |
diff --git a/net/sunrpc/sched.c b/net/sunrpc/sched.c index 2ac43c41c3a9..b5723c262a3e 100644 --- a/net/sunrpc/sched.c +++ b/net/sunrpc/sched.c | |||
@@ -1031,13 +1031,13 @@ rpc_init_mempool(void) | |||
1031 | rpc_task_slabp = kmem_cache_create("rpc_tasks", | 1031 | rpc_task_slabp = kmem_cache_create("rpc_tasks", |
1032 | sizeof(struct rpc_task), | 1032 | sizeof(struct rpc_task), |
1033 | 0, SLAB_HWCACHE_ALIGN, | 1033 | 0, SLAB_HWCACHE_ALIGN, |
1034 | NULL, NULL); | 1034 | NULL); |
1035 | if (!rpc_task_slabp) | 1035 | if (!rpc_task_slabp) |
1036 | goto err_nomem; | 1036 | goto err_nomem; |
1037 | rpc_buffer_slabp = kmem_cache_create("rpc_buffers", | 1037 | rpc_buffer_slabp = kmem_cache_create("rpc_buffers", |
1038 | RPC_BUFFER_MAXSIZE, | 1038 | RPC_BUFFER_MAXSIZE, |
1039 | 0, SLAB_HWCACHE_ALIGN, | 1039 | 0, SLAB_HWCACHE_ALIGN, |
1040 | NULL, NULL); | 1040 | NULL); |
1041 | if (!rpc_buffer_slabp) | 1041 | if (!rpc_buffer_slabp) |
1042 | goto err_nomem; | 1042 | goto err_nomem; |
1043 | rpc_task_mempool = mempool_create_slab_pool(RPC_TASK_POOLSIZE, | 1043 | rpc_task_mempool = mempool_create_slab_pool(RPC_TASK_POOLSIZE, |
diff --git a/net/tipc/handler.c b/net/tipc/handler.c index e1dcf663f8a6..0c70010a7dfe 100644 --- a/net/tipc/handler.c +++ b/net/tipc/handler.c | |||
@@ -97,7 +97,7 @@ int tipc_handler_start(void) | |||
97 | { | 97 | { |
98 | tipc_queue_item_cache = | 98 | tipc_queue_item_cache = |
99 | kmem_cache_create("tipc_queue_items", sizeof(struct queue_item), | 99 | kmem_cache_create("tipc_queue_items", sizeof(struct queue_item), |
100 | 0, SLAB_HWCACHE_ALIGN, NULL, NULL); | 100 | 0, SLAB_HWCACHE_ALIGN, NULL); |
101 | if (!tipc_queue_item_cache) | 101 | if (!tipc_queue_item_cache) |
102 | return -ENOMEM; | 102 | return -ENOMEM; |
103 | 103 | ||
diff --git a/net/xfrm/xfrm_input.c b/net/xfrm/xfrm_input.c index 5c4695840c58..113f44429982 100644 --- a/net/xfrm/xfrm_input.c +++ b/net/xfrm/xfrm_input.c | |||
@@ -83,5 +83,5 @@ void __init xfrm_input_init(void) | |||
83 | secpath_cachep = kmem_cache_create("secpath_cache", | 83 | secpath_cachep = kmem_cache_create("secpath_cache", |
84 | sizeof(struct sec_path), | 84 | sizeof(struct sec_path), |
85 | 0, SLAB_HWCACHE_ALIGN|SLAB_PANIC, | 85 | 0, SLAB_HWCACHE_ALIGN|SLAB_PANIC, |
86 | NULL, NULL); | 86 | NULL); |
87 | } | 87 | } |
diff --git a/net/xfrm/xfrm_policy.c b/net/xfrm/xfrm_policy.c index cfaf17c8851e..c3a4b0a18687 100644 --- a/net/xfrm/xfrm_policy.c +++ b/net/xfrm/xfrm_policy.c | |||
@@ -2378,7 +2378,7 @@ static void __init xfrm_policy_init(void) | |||
2378 | xfrm_dst_cache = kmem_cache_create("xfrm_dst_cache", | 2378 | xfrm_dst_cache = kmem_cache_create("xfrm_dst_cache", |
2379 | sizeof(struct xfrm_dst), | 2379 | sizeof(struct xfrm_dst), |
2380 | 0, SLAB_HWCACHE_ALIGN|SLAB_PANIC, | 2380 | 0, SLAB_HWCACHE_ALIGN|SLAB_PANIC, |
2381 | NULL, NULL); | 2381 | NULL); |
2382 | 2382 | ||
2383 | hmask = 8 - 1; | 2383 | hmask = 8 - 1; |
2384 | sz = (hmask+1) * sizeof(struct hlist_head); | 2384 | sz = (hmask+1) * sizeof(struct hlist_head); |
diff --git a/security/keys/key.c b/security/keys/key.c index 700400d801dc..01bbc6d9d19b 100644 --- a/security/keys/key.c +++ b/security/keys/key.c | |||
@@ -1001,7 +1001,7 @@ void __init key_init(void) | |||
1001 | { | 1001 | { |
1002 | /* allocate a slab in which we can store keys */ | 1002 | /* allocate a slab in which we can store keys */ |
1003 | key_jar = kmem_cache_create("key_jar", sizeof(struct key), | 1003 | key_jar = kmem_cache_create("key_jar", sizeof(struct key), |
1004 | 0, SLAB_HWCACHE_ALIGN|SLAB_PANIC, NULL, NULL); | 1004 | 0, SLAB_HWCACHE_ALIGN|SLAB_PANIC, NULL); |
1005 | 1005 | ||
1006 | /* add the special key types */ | 1006 | /* add the special key types */ |
1007 | list_add_tail(&key_type_keyring.link, &key_types_list); | 1007 | list_add_tail(&key_type_keyring.link, &key_types_list); |
diff --git a/security/selinux/avc.c b/security/selinux/avc.c index 78c408fd2b02..ecd067384531 100644 --- a/security/selinux/avc.c +++ b/security/selinux/avc.c | |||
@@ -239,7 +239,7 @@ void __init avc_init(void) | |||
239 | atomic_set(&avc_cache.lru_hint, 0); | 239 | atomic_set(&avc_cache.lru_hint, 0); |
240 | 240 | ||
241 | avc_node_cachep = kmem_cache_create("avc_node", sizeof(struct avc_node), | 241 | avc_node_cachep = kmem_cache_create("avc_node", sizeof(struct avc_node), |
242 | 0, SLAB_PANIC, NULL, NULL); | 242 | 0, SLAB_PANIC, NULL); |
243 | 243 | ||
244 | audit_log(current->audit_context, GFP_KERNEL, AUDIT_KERNEL, "AVC INITIALIZED\n"); | 244 | audit_log(current->audit_context, GFP_KERNEL, AUDIT_KERNEL, "AVC INITIALIZED\n"); |
245 | } | 245 | } |
diff --git a/security/selinux/hooks.c b/security/selinux/hooks.c index 26356e67108e..0fac6829c63a 100644 --- a/security/selinux/hooks.c +++ b/security/selinux/hooks.c | |||
@@ -4913,7 +4913,7 @@ static __init int selinux_init(void) | |||
4913 | 4913 | ||
4914 | sel_inode_cache = kmem_cache_create("selinux_inode_security", | 4914 | sel_inode_cache = kmem_cache_create("selinux_inode_security", |
4915 | sizeof(struct inode_security_struct), | 4915 | sizeof(struct inode_security_struct), |
4916 | 0, SLAB_PANIC, NULL, NULL); | 4916 | 0, SLAB_PANIC, NULL); |
4917 | avc_init(); | 4917 | avc_init(); |
4918 | 4918 | ||
4919 | original_ops = secondary_ops = security_ops; | 4919 | original_ops = secondary_ops = security_ops; |
diff --git a/security/selinux/ss/avtab.c b/security/selinux/ss/avtab.c index 3122908afdc1..85705eb289e0 100644 --- a/security/selinux/ss/avtab.c +++ b/security/selinux/ss/avtab.c | |||
@@ -445,7 +445,7 @@ void avtab_cache_init(void) | |||
445 | { | 445 | { |
446 | avtab_node_cachep = kmem_cache_create("avtab_node", | 446 | avtab_node_cachep = kmem_cache_create("avtab_node", |
447 | sizeof(struct avtab_node), | 447 | sizeof(struct avtab_node), |
448 | 0, SLAB_PANIC, NULL, NULL); | 448 | 0, SLAB_PANIC, NULL); |
449 | } | 449 | } |
450 | 450 | ||
451 | void avtab_cache_destroy(void) | 451 | void avtab_cache_destroy(void) |